Minimax correcao

This commit is contained in:
2026-04-02 11:45:46 +00:00
parent ca2bdc19ab
commit 3132bb73a2
30 changed files with 118 additions and 1337 deletions

View File

@@ -23,21 +23,7 @@ export const ProtectedRoute: React.FC<ProtectedRouteProps> = ({
requireEdit = false,
redirectTo = '/',
}) => {
const { appUser, isLoading, canEdit, isSignedIn } = useAuth();
// Show loading state
if (isLoading) {
return (
<div className="flex items-center justify-center min-h-[60vh]">
<RefreshCw size={32} className="animate-spin text-primary" />
</div>
);
}
// Check authentication
if (!isSignedIn) {
return <Navigate to="/login" replace />;
}
const { appUser, canEdit } = useAuth();
// Check role-based access
if (allowedRoles && appUser && !allowedRoles.includes(appUser.role)) {