From 2f0cb8ec3661fd838c0a7a03d1c20c185efed47c Mon Sep 17 00:00:00 2001 From: Jeff Date: Sat, 21 Sep 2024 22:31:19 -0400 Subject: [PATCH] Try requesting permission --- app/routes/_index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 0414972..2583754 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -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",