Try requesting permission
Test / test (push) Failing after 54s Details

This commit is contained in:
Jeff 2024-09-21 22:31:19 -04:00
parent 695373001b
commit 2f0cb8ec36
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ function EnableButton({ onSubscribe }: { onSubscribe: () => void }) {
async function subscribe() {
console.log("Hey the thing was clicked wow")
await new Promise((resolve) =>
window.Notification.requestPermission(resolve)
)
subscribeToPush("Derpderp", (subscription) => {
fetch("/subscribe", {
method: "POST",