feat(silo adjustments): added in email if % wrong

This commit is contained in:
2025-04-06 07:47:39 -05:00
parent 85e3d46b2e
commit 95bebbde2b
10 changed files with 178 additions and 11 deletions

View File

@@ -1,9 +1,28 @@
import { createFileRoute } from '@tanstack/react-router'
import SiloPage from "@/components/logistics/siloAdjustments/SiloPage";
import { createFileRoute, redirect } from "@tanstack/react-router";
export const Route = createFileRoute('/(logistics)/siloAdjustments/')({
component: RouteComponent,
})
export const Route = createFileRoute("/(logistics)/siloAdjustments/")({
component: RouteComponent,
beforeLoad: async () => {
const auth = localStorage.getItem("auth_token");
if (!auth) {
throw redirect({
to: "/login",
search: {
// Use the current location to power a redirect after login
// (Do not use `router.state.resolvedLocation` as it can
// potentially lag behind the actual current location)
redirect: location.pathname + location.search,
},
});
}
},
});
function RouteComponent() {
return <div>Hello "/(logistics)/siloAdjustments/"!</div>
return (
<div>
<SiloPage />
</div>
);
}