fix: authorization / registration

This commit is contained in:
2026-05-10 19:45:39 +03:00
parent 9709bb9d7b
commit f489063a6a
2 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
import { Navigate, Outlet } from 'react-router-dom'
import { useIsAuthenticated } from '@features/auth'
import { ROUTES } from '@shared/config/routes'
export function GuestRoute() {
const { isAuthenticated, isLoading } = useIsAuthenticated()
if (isLoading) return null
if (isAuthenticated) return <Navigate to={ROUTES.WALLET} replace />
return <Outlet />
}