This commit is contained in:
2025-03-20 14:26:57 +05:00
commit eb552cbdc8
55 changed files with 2212 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { Navigate, Outlet } from "react-router";
import useAuthStore from "../stores/useAuthStore";
function ProtectedPage() {
const { token } = useAuthStore();
return token ? <Outlet /> : <Navigate to="/login" />;
}
export default ProtectedPage;