aboutsummaryrefslogtreecommitdiffstats
path: root/site/src/components/NotificationButton.tsx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-03 17:03:25 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-03 17:03:53 -0700
commit399a4e2c515f723b1c8fe5f20840fc0e36fa7c9b (patch)
tree99d63ecbe8f514b35594c84d6d82b58197f83f38 /site/src/components/NotificationButton.tsx
parent8aa09338d305d7aa3539f983a28cae0ed614d0b8 (diff)
fix: remove subscriptions after disabling notifications
Diffstat (limited to 'site/src/components/NotificationButton.tsx')
-rw-r--r--site/src/components/NotificationButton.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/site/src/components/NotificationButton.tsx b/site/src/components/NotificationButton.tsx
index 1e9bc5e..fa31cde 100644
--- a/site/src/components/NotificationButton.tsx
+++ b/site/src/components/NotificationButton.tsx
@@ -178,6 +178,9 @@ export default function NotificationButton({ className = "", isMoe = false, game
console.log("FCM token deleted");
localStorage.removeItem('fcm_token');
+ // Clear all subscribed topics
+ localStorage.removeItem('subscribed_topics');
+
if ('serviceWorker' in navigator) {
const registration = await navigator.serviceWorker.getRegistration('/firebase-messaging-sw.js');
if (registration) {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage