refactor: outsource auth function in all routes

This commit is contained in:
2026-07-10 11:17:31 +02:00
parent ef5fb3e1da
commit 3153076d72
8 changed files with 105 additions and 107 deletions
+4
View File
@@ -1,7 +1,11 @@
import { createFileRoute } from "@tanstack/react-router";
import { LoginCard } from "../components/LoginCard";
import { checkLogin } from "../utils/api/auth.ts";
export const Route = createFileRoute("/login")({
beforeLoad: async () => {
await checkLogin();
},
component: RouteComponent,
});