import { Loader2 } from 'lucide-react'; import { useEffect, useState } from 'react'; import { useSystemStatus } from '@/react/portainer/system/useSystemStatus'; import { Modal } from '@@/modals/Modal'; import { Icon } from '@@/Icon'; export function LoadingDialog() { useWaitForServerStatus(); return (

Upgrading Portainer...

Please wait while we upgrade your Portainer to Business Edition.

); } function useWaitForServerStatus() { const [enabled, setEnabled] = useState(false); useSystemStatus({ enabled, retry: true, onSuccess() { window.location.reload(); }, }); useEffect(() => { const timeoutId = setTimeout(() => { setEnabled(true); }, 3000); return () => { clearTimeout(timeoutId); }; }); }