Files
stockhome/frontend/src/routes/app/_hiddenLayout/inventory.tsx
T

22 lines
444 B
TypeScript

import { createFileRoute, redirect } from "@tanstack/react-router";
import { isAuthenticated } from "../../../utils/auth";
export const Route = createFileRoute("/app/_hiddenLayout/inventory")({
beforeLoad: async () => {
if (!(await isAuthenticated())) {
throw redirect({
to: "/login",
});
}
},
component: RouteComponent,
});
function RouteComponent() {
return (
<>
<p>Inventar</p>
</>
);
}