feat(lst): tan stack routes added with protected routes

This commit is contained in:
2025-02-19 20:11:40 -06:00
parent 83f6fbf760
commit 5f8943492e
23 changed files with 608 additions and 74 deletions

View File

@@ -0,0 +1,12 @@
import {createFileRoute, redirect} from "@tanstack/react-router";
// src/routes/_authenticated.tsx
export const Route = createFileRoute("/_auth")({
beforeLoad: async ({context}) => {
if (!context.sessionType.session) {
throw redirect({
to: "/",
});
}
},
});