significant refactor

This commit is contained in:
2025-08-30 01:42:23 -05:00
parent 7136f646a3
commit 052f53444e
106 changed files with 1994 additions and 1701 deletions

View File

@@ -1,18 +1,18 @@
import { Outlet, redirect, createFileRoute } from "@tanstack/react-router";
export const Route = createFileRoute('/_authed/admin')({
export const Route = createFileRoute("/_authed/admin")({
component: Outlet,
beforeLoad: ({ context }) => {
if (!context.auth?.roles?.includes('Admin')) {
throw redirect({ to: '/' })
if (!context.auth?.roles?.includes("Admin")) {
throw redirect({ to: "/" });
}
return {
header: {
...context.header,
title: 'Admin',
withBackButton: true
title: "Admin",
withBackButton: true,
},
};
}
})
},
});