Try requesting permission
Test / test (push) Failing after 54s
Details
Test / test (push) Failing after 54s
Details
This commit is contained in:
parent
695373001b
commit
2f0cb8ec36
|
|
@ -78,6 +78,9 @@ function EnableButton({ onSubscribe }: { onSubscribe: () => void }) {
|
||||||
|
|
||||||
async function subscribe() {
|
async function subscribe() {
|
||||||
console.log("Hey the thing was clicked wow")
|
console.log("Hey the thing was clicked wow")
|
||||||
|
await new Promise((resolve) =>
|
||||||
|
window.Notification.requestPermission(resolve)
|
||||||
|
)
|
||||||
subscribeToPush("Derpderp", (subscription) => {
|
subscribeToPush("Derpderp", (subscription) => {
|
||||||
fetch("/subscribe", {
|
fetch("/subscribe", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue