ok
This commit is contained in:
@@ -20,10 +20,10 @@ self.addEventListener("notificationclick", (event) => {
|
||||
|
||||
const { cafeId, transactionId } = event.notification.data; // Get the notification data
|
||||
|
||||
// Open the URL with the cafeId and transactionId
|
||||
event.waitUntil(
|
||||
clients.openWindow(
|
||||
`https://srrk5s-3000.csb.app/${cafeId}?modal=new_transaction&transactionId=${transactionId}`
|
||||
)
|
||||
);
|
||||
// Dynamically detect the domain and construct the URL
|
||||
const domainUrl = self.location.origin;
|
||||
const url = `${domainUrl}/${cafeId}?modal=new_transaction&transactionId=${transactionId}`;
|
||||
|
||||
// Open the constructed URL
|
||||
event.waitUntil(clients.openWindow(url));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user