Finalize CRM transformation, mobile responsiveness, and Qdrant integration
This commit is contained in:
11
src/components/AuthGuard.jsx
Normal file
11
src/components/AuthGuard.jsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Navigate, Outlet } from 'react-router-dom';
|
||||
|
||||
export default function AuthGuard({ children }) {
|
||||
const token = localStorage.getItem('auth_token');
|
||||
|
||||
if (!token) {
|
||||
return <Navigate to="/login" replace />;
|
||||
}
|
||||
|
||||
return children || <Outlet />;
|
||||
}
|
||||
Reference in New Issue
Block a user