diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx index 7e8ebc1f..9338ddb2 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush/index.tsx @@ -163,12 +163,15 @@ const UserWebPushSettings = () => { const verifyWebPush = async () => { const enabled = await verifyPushSubscription(user?.id, currentSettings); setWebPushEnabled(enabled); + if (enabled) { + localStorage.setItem('pushNotificationsEnabled', 'true'); + } }; if (user?.id) { verifyWebPush(); } - }, [user?.id, currentSettings]); + }, [user?.id, currentSettings, dataDevices]); useEffect(() => { const getSubscriptionEndpoint = async () => {