mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 01:15:28 +00:00
Maybe this will work!
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user