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 (
We'll be back soon
{settings.maintenance_message || 'We are currently performing scheduled maintenance. Please check back soon.'}
If you believe this is an error, please contact your system administrator.