feat(auth): implement login authorization

feat(font): implement satoshi font family
This commit is contained in:
shafin-r
2026-01-11 15:44:51 +06:00
parent bd6f1d2333
commit 1506c25796
35 changed files with 3870 additions and 7 deletions

View File

@ -0,0 +1,13 @@
import { Navigate, Outlet, useLocation } from "react-router-dom";
import { useAuthStore } from "../stores/authStore";
export const ProtectedRoute = () => {
const isAuthenticated = useAuthStore((state) => state.isAuthenticated);
const location = useLocation();
if (!isAuthenticated) {
return <Navigate to="/login" state={{ from: location }} replace />;
}
return <Outlet />;
};