feat(client): check in

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2025-12-25 02:17:41 +08:00
committed by Asai Neko
parent 606c74c587
commit 9ac598cd98
5 changed files with 52 additions and 31 deletions

View File

@@ -4,13 +4,10 @@ import { hasToken } from '@/lib/token';
export const Route = createFileRoute('/_sidebarLayout/')({
component: Index,
beforeLoad: async ({ location }) => {
beforeLoad: async () => {
if (!hasToken()) {
throw redirect({
to: '/login',
search: {
redirect: location.href,
},
});
}
},