ok
This commit is contained in:
10
src/App.js
10
src/App.js
@@ -268,6 +268,14 @@ function App() {
|
||||
socket.on("transaction_success", async (data) => {
|
||||
console.log("transaction notification");
|
||||
setModal("transaction_success", data);
|
||||
|
||||
// If 'lastTransaction' exists, proceed
|
||||
localStorage.removeItem("lastTransaction");
|
||||
|
||||
if (lastTransaction != null) {
|
||||
setLastTransaction(null);
|
||||
console.log('remove last transaction')
|
||||
}
|
||||
});
|
||||
|
||||
socket.on("transaction_end", async (data) => {
|
||||
@@ -306,7 +314,7 @@ function App() {
|
||||
let searchModal = searchParams.get("modal") || ''; // Get transactionId or set it to empty string
|
||||
|
||||
if (permission !== "granted" && searchModal == '') {
|
||||
setModal("message", { captMessage: 'Notifikasi tidak aktif', descMessage: 'Aktifkan notifikasi supaya kamu tetap dapat info pesanan, meski sedang buka aplikasi lain.' }, null, handleNotificationClick);
|
||||
setModal("message", { captMessage: 'Notifikasi tidak aktif', descMessage: 'Aktifkan notifikasi supaya kamu tetap dapat info pesanan, meski sedang buka aplikasi lain.', yesText: 'Aktifkan', noText: 'Tutup' }, null, handleNotificationClick);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user