Files
HellreigN/frontend/src/app/providers/routing/helper/protected.route.tsx
T
nikita f537f1eab9
ci-front / build (push) Successful in 2m19s
feat: IDE
2026-04-04 04:59:42 +03:00

13 lines
353 B
TypeScript

import { useAuthStore } from "@/modules/auth/store/useAuthStore";
import { Navigate } from "react-router-dom";
export const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
const { isAuthenticated } = useAuthStore();
// if (!isAuthenticated) {
// return <Navigate to="/auth" replace />;
// }
return <>{children}</>;
};