- added settings page and function

- add Role Ring for avatar and display role for user nav
This commit is contained in:
2026-01-06 21:37:53 +07:00
parent 8146565d2c
commit a4e96fe045
64 changed files with 2828 additions and 726 deletions

View File

@@ -1,18 +1,14 @@
import { authMiddleware } from '@/lib/middleware'
import { createFileRoute, Outlet, redirect } 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' })
throw redirect({ to: '/sign-in' });
}
},
component: RouteComponent,
server: {
middleware: [authMiddleware],
},
})
});
function RouteComponent() {
return <Outlet />
return <Outlet />;
}