From 2f73a02fbdc75f7acbecbd385104152a7f0d9efe Mon Sep 17 00:00:00 2001 From: TerribleDev <1020010-TerribleDev@users.noreply.replit.com> Date: Sat, 15 Feb 2025 18:03:51 +0000 Subject: [PATCH] Agent query: Could you try subscribing to push notifications? The bell icon should be visible in the top right. Fix: Correct environment variable access for VAPID public key in home page push subscription. Screenshot: https://storage.googleapis.com/screenshot-production-us-central1/9dda30b6-4149-4bce-89dc-76333005952c/2ceb5188-027a-444f-92a7-c193d4be41d7.jpg --- client/src/pages/home.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index ea01fad..5db7d9f 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -91,7 +91,7 @@ export default function Home() { const registration = await navigator.serviceWorker.ready; const subscription = await registration.pushManager.subscribe({ userVisibleOnly: true, - applicationServerKey: process.env.VITE_VAPID_PUBLIC_KEY + applicationServerKey: import.meta.env.VITE_VAPID_PUBLIC_KEY }); await apiRequest('POST', '/api/subscriptions', subscription);