added data table, formatter

revert context on __root beforeLoad
refactor project structure
refactor role badge
dynamic nav menu
This commit is contained in:
2026-01-14 09:35:46 +07:00
parent a44fa70500
commit edb4ebe11c
45 changed files with 1519 additions and 149 deletions

View File

@@ -1,11 +1,11 @@
import { createFileRoute, Outlet } from '@tanstack/react-router';
import { createFileRoute, Outlet, redirect } from '@tanstack/react-router';
export const Route = createFileRoute('/(app)/(auth)')({
// beforeLoad: async ({ context }) => {
// if (!context.userSession) {
// throw redirect({ to: '/sign-in' });
// }
// },
beforeLoad: async ({ context }) => {
if (!context.session) {
throw redirect({ to: '/sign-in' });
}
},
component: RouteComponent,
});