diff --git a/src/components/PWAUpdatePrompt.tsx b/src/components/PWAUpdatePrompt.tsx index 58872fae..6cd65b08 100644 --- a/src/components/PWAUpdatePrompt.tsx +++ b/src/components/PWAUpdatePrompt.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { useRegisterSW } from 'virtual:pwa-register/react'; -import { Sparkles } from 'lucide-react'; +import { Sparkles, X } from 'lucide-react'; /** * Component that prompts users to update when a new service worker is available @@ -52,22 +52,38 @@ export function PWAUpdatePrompt() { updateServiceWorker(true); }; + const handleDismiss = (e: React.MouseEvent) => { + e.stopPropagation(); + setShowPrompt(false); + }; + if (!showPrompt) { return null; } return (
- +
+ + {!isUpdating && ( + + )} +
); }