fix(webpush): update localStorage handling for push notification status
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user