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