Files
lstV2/frontend/src/routes/_eom.tsx

14 lines
352 B
TypeScript

import {createFileRoute, redirect} from "@tanstack/react-router";
export const Route = createFileRoute("/_eom")({
//component: RouteComponent,
beforeLoad: async () => {
const auth = localStorage.getItem("auth_token");
if (!auth) {
throw redirect({
to: "/login",
});
}
},
});