feat(client): check in
Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user