diff --git a/components/NotificationDebug.tsx b/components/NotificationDebug.tsx index 788ef06..d8d9e85 100644 --- a/components/NotificationDebug.tsx +++ b/components/NotificationDebug.tsx @@ -3,9 +3,11 @@ import { useEffect, useState } from 'react'; export default function NotificationDebug() { + const [mounted, setMounted] = useState(false); const [debug, setDebug] = useState({}); useEffect(() => { + setMounted(true); const info = { notificationSupported: 'Notification' in window, serviceWorkerSupported: 'serviceWorker' in navigator, @@ -16,6 +18,10 @@ export default function NotificationDebug() { setDebug(info); }, []); + if (!mounted) { + return null; + } + return (
Push Debug: