Feat(Fix): SSH Keys-Expiry+Log; Department+Principal Link; CA Keys mgmt;

- Fix Login nav to /profile or /
This commit is contained in:
2026-02-28 23:35:32 +05:45
parent c32cb4757a
commit 62f767474b
12 changed files with 2850 additions and 236 deletions
+10 -3
View File
@@ -1,13 +1,20 @@
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";
import { useAuth } from "@/contexts/AuthContext";
const Index = () => {
const navigate = useNavigate();
const { isAuthenticated, isLoading } = useAuth();
useEffect(() => {
// Redirect to login for now - will be replaced with auth check
navigate("/login");
}, [navigate]);
if (isLoading) return; // Wait for auth check to complete
if (isAuthenticated) {
navigate("/profile");
} else {
navigate("/login");
}
}, [isLoading, isAuthenticated, navigate]);
return null;
};