This commit is contained in:
Bulut Kuru
2026-03-27 21:06:38 +03:00
parent f6c815ee88
commit f46b9d795d
285 changed files with 47574 additions and 90 deletions

View File

@@ -0,0 +1,18 @@
import { createFileRoute, redirect } from '@tanstack/react-router'
import { AuthenticatedLayout } from '@/components/layout/authenticated-layout'
import { useAuthStore } from '@/stores/auth-store'
export const Route = createFileRoute('/_authenticated')({
beforeLoad: ({ location }) => {
const { accessToken } = useAuthStore.getState().auth
if (!accessToken) {
throw redirect({
to: '/sign-in',
search: {
redirect: location.href,
},
})
}
},
component: AuthenticatedLayout,
})