feat: refresh token

This commit is contained in:
naiba
2024-11-05 00:02:43 +08:00
parent b1a0b607da
commit bfdae2838f
5 changed files with 35 additions and 20 deletions

View File

@@ -7,7 +7,7 @@ export const ProtectedRoute = ({ children }: {
const { profile } = useAuth();
if (!profile && window.location.pathname !== "/dashboard/login") {
return <Navigate to="/dashboard/login" />;
return <><Navigate to="/dashboard/login" />{children}</>;
}
return children;