mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-19 15:01:27 +02:00
16 lines
392 B
TypeScript
16 lines
392 B
TypeScript
import { createFileRoute, Outlet, redirect } from "@tanstack/react-router"
|
|
|
|
export const Route = createFileRoute("/_layout/(auth)/_auth")({
|
|
beforeLoad: async ({ context }) => {
|
|
const auth = await context.auth
|
|
if (auth?.userId) {
|
|
throw redirect({ to: "/links", replace: true })
|
|
}
|
|
},
|
|
component: () => (
|
|
<main className="h-full">
|
|
<Outlet />
|
|
</main>
|
|
),
|
|
})
|