feat: add department dashboard
This commit is contained in:
7
frontend/src/auth/PublicRoute.tsx
Normal file
7
frontend/src/auth/PublicRoute.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import {Navigate, Outlet} from "react-router-dom";
|
||||
import {useAuth} from "@/context/AuthContext";
|
||||
|
||||
export default function PublicRoute() {
|
||||
const {token} = useAuth();
|
||||
return token ? <Navigate to="/dashboard" replace /> : <Outlet />;
|
||||
}
|
||||
Reference in New Issue
Block a user