diff --git a/pages/api/notify.ts b/pages/api/notify.ts index d34ddf3..f554728 100644 --- a/pages/api/notify.ts +++ b/pages/api/notify.ts @@ -114,7 +114,7 @@ const Notification = async (req, res) => { } else if (id) { console.log('Sending push notification to publisher ', id) - await sendPush(id, title, message.actions) + await sendPush(id, title, message, actions) res.statusCode = 200 res.end() return diff --git a/pages/cart/calendar/index.tsx b/pages/cart/calendar/index.tsx index c0e2baf..4a04176 100644 --- a/pages/cart/calendar/index.tsx +++ b/pages/cart/calendar/index.tsx @@ -833,7 +833,20 @@ export default function CalendarPage({ initialEvents, initialShifts }) { headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ broadcast: true, message: "Тестово съобщение", title: "Това е тестово съобщение от https://sofia.mwitnessing.com" }) + body: JSON.stringify({ + id: pub.id, message: "Тестово съобщение", title: "Това е тестово съобщение от https://sofia.mwitnessing.com", actions: [ + { + action: 'open_url', + title: 'Open URL', + icon: '/images/open-url.png' + }, + { + action: 'dismiss', + title: 'Dismiss', + icon: '/images/dismiss.png' + } + ] + }) }) }} >+ diff --git a/pages/dash.tsx b/pages/dash.tsx index 01e4ae8..2aeb5f7 100644 --- a/pages/dash.tsx +++ b/pages/dash.tsx @@ -108,7 +108,7 @@ export default function DashboardPage({ initialItems, initialUserId, cartEvents, toast(content, { toastId, autoClose: false, // Keep the toast open until manually closed - closeButton: true, + closeButton: false, onClose: () => handleClose(toastId), }); });