Add more log
Test / test (push) Failing after 30s Details

This commit is contained in:
Jeff 2024-10-12 17:06:34 -04:00
parent a07f028b75
commit b92750e5d5
1 changed files with 6 additions and 3 deletions

View File

@ -49,9 +49,12 @@ function EnableButton({ onSubscribe }: { onSubscribe: () => void }) {
`subscriptions: ${JSON.stringify(subscription.toJSON())}`,
])
try {
navigator.serviceWorker.controller?.postMessage({
type: "subscribed",
subscription: subscription.toJSON(),
navigator.serviceWorker.ready.then((registration) => {
registration.active?.postMessage({
type: "subscribed",
subscription: subscription.toJSON(),
})
setLog((prev) => [...prev, "After post message"])
})
// onSubscribe()
} catch (error) {