Files
linsa-linsa-io/web/app/routes/_layout/(auth)/_auth.tsx
Aslam e5a0332ec9 chore(start): update to alpha and fix editor image removed (#187)
* chore(start): update to alpha and fix editor image removed

* chore: fix image editor
2024-11-19 02:22:46 +07:00

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>
),
})