feat: initial commit

This commit is contained in:
2026-03-08 08:34:55 +01:00
parent 3eb7c3ca8e
commit 43c9efd8f5
39 changed files with 13242 additions and 688 deletions

View File

@@ -0,0 +1,13 @@
import { Navigate } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
export default function RoleRedirect() {
const { role, loading } = useAuth();
if (loading) return null;
if (role === 'admin') return <Navigate to="/admin" replace />;
if (role === 'firmenleiter') return <Navigate to="/firmenleiter" replace />;
if (role === 'filialleiter') return <Navigate to="/filialleiter" replace />;
return <Navigate to="/tracker" replace />;
}