fix(webpush): update localStorage handling for push notification status

Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
This commit is contained in:
0xsysr3ll
2025-12-07 16:00:16 +01:00
parent 44b34a0081
commit 8f1b81becc

View File

@@ -163,9 +163,10 @@ const UserWebPushSettings = () => {
const verifyWebPush = async () => {
const enabled = await verifyPushSubscription(user?.id, currentSettings);
setWebPushEnabled(enabled);
if (enabled) {
localStorage.setItem('pushNotificationsEnabled', 'true');
}
localStorage.setItem(
'pushNotificationsEnabled',
enabled ? 'true' : 'false'
);
};
if (user?.id) {