| import { Navigate } from "react-router-dom"; | |
| import { useAuthStore } from "../../features/auth/store/authStore"; | |
| export default function ProtectedRoute({ | |
| children, | |
| }: { | |
| children: React.ReactNode; | |
| }) { | |
| const isAuthenticated = useAuthStore((s) => s.isAuthenticated); | |
| if (!isAuthenticated) return <Navigate to="/login" replace />; | |
| return <>{children}</>; | |
| } | |
Xet Storage Details
- Size:
- 365 Bytes
- Xet hash:
- 1602e2fa3b217355f6ffa7ca599dcde73914d46aa59e8e746d99bbc91f7d4cc9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.