import React from "react"; import { useLocation } from "react-router-dom"; import { useMaintenance } from "@/contexts/MaintenanceContext"; import MaintenancePage from "@/pages/Maintenance"; const ALLOWED_PATHS = ["/login", "/staff/login", "/reset-password", "/health"]; interface MaintenanceGuardProps { children: React.ReactNode; } export default function MaintenanceGuard({ children }: MaintenanceGuardProps) { const { isMaintenanceMode, canBypass, loading } = useMaintenance(); const location = useLocation(); if (loading) { return (