summaryrefslogtreecommitdiff
path: root/frontend/sw.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/sw.js')
-rw-r--r--frontend/sw.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/frontend/sw.js b/frontend/sw.js
index e69de29..bf38ae2 100644
--- a/frontend/sw.js
+++ b/frontend/sw.js
@@ -0,0 +1,7 @@
+self.addEventListener('push', (e) => {
+ const data = e.data.json();
+ self.registration.showNotification(data.title, {
+ body: data.body,
+ icon: data.icon,
+ });
+});