Maybe this will work!
parent
55d607d8ea
commit
c2084c3f2a
|
|
@ -97,9 +97,7 @@ export const Notifications = observer(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const reg =
|
const reg =
|
||||||
await navigator.serviceWorker.getRegistration(
|
await navigator.serviceWorker.getRegistration();
|
||||||
`${window.location.origin}/sw.js`,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (reg) {
|
if (reg) {
|
||||||
if (pushEnabled) {
|
if (pushEnabled) {
|
||||||
|
|
@ -113,8 +111,6 @@ export const Notifications = observer(() => {
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(sub);
|
|
||||||
|
|
||||||
// tell the server we just subscribed
|
// tell the server we just subscribed
|
||||||
const json = sub.toJSON();
|
const json = sub.toJSON();
|
||||||
if (json.keys) {
|
if (json.keys) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue