diff --git a/components/notifications.js b/components/notifications.js index 95212f8d..f73ae419 100644 --- a/components/notifications.js +++ b/components/notifications.js @@ -257,8 +257,10 @@ function NotificationAlert () { const pushNotify = useNotification() useEffect(() => { - setShowAlert(!localStorage.getItem('hideNotifyPrompt')) - }, []) + // basically, we only want to show the alert if the user hasn't interacted with + // either opt-in of the double opt-in + setShowAlert(pushNotify.isDefault && !localStorage.getItem('hideNotifyPrompt')) + }, [pushNotify]) const close = () => { localStorage.setItem('hideNotifyPrompt', 'yep') @@ -268,7 +270,7 @@ function NotificationAlert () { return ( showAlert ? ( - + Enable push notifications?