13 lines
353 B
TypeScript
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}</>;
|
|
};
|