mirror of
https://github.com/get-drexa/drive.git
synced 2025-12-01 05:51:39 +00:00
20 lines
418 B
TypeScript
20 lines
418 B
TypeScript
|
|
import { createFileRoute, Navigate, Outlet } from "@tanstack/react-router"
|
||
|
|
import { Authenticated, Unauthenticated } from "convex/react"
|
||
|
|
|
||
|
|
export const Route = createFileRoute("/_authenticated")({
|
||
|
|
component: AuthenticatedLayout,
|
||
|
|
})
|
||
|
|
|
||
|
|
function AuthenticatedLayout() {
|
||
|
|
return (
|
||
|
|
<>
|
||
|
|
<Authenticated>
|
||
|
|
<Outlet />
|
||
|
|
</Authenticated>
|
||
|
|
<Unauthenticated>
|
||
|
|
<Navigate to="/login" />
|
||
|
|
</Unauthenticated>
|
||
|
|
</>
|
||
|
|
)
|
||
|
|
}
|