ok
This commit is contained in:
20
src/App.js
20
src/App.js
@@ -413,27 +413,27 @@ function App() {
|
||||
setModalContent(content)
|
||||
};
|
||||
|
||||
// Function to close the modal
|
||||
const closeModal = (closeTheseContent = []) => {
|
||||
if (
|
||||
Array.isArray(closeTheseContent) &&
|
||||
(closeTheseContent.length === 0 ||
|
||||
closeTheseContent.includes(modalContent))
|
||||
(closeTheseContent.length === 0 || closeTheseContent.includes(modalContent))
|
||||
) {
|
||||
setIsModalOpen(false);
|
||||
setModalContent(null);
|
||||
document.body.style.overflow = "auto";
|
||||
|
||||
|
||||
const queryParams = new URLSearchParams(location.search);
|
||||
|
||||
// Remove the 'modal' parameter
|
||||
queryParams.delete("modal");
|
||||
queryParams.delete("transactionId");
|
||||
|
||||
// Update the URL without the 'modal' parameter
|
||||
|
||||
// Clear all query parameters
|
||||
queryParams.keys() && [...queryParams.keys()].forEach(key => {
|
||||
queryParams.delete(key);
|
||||
});
|
||||
|
||||
// Update the URL without any query parameters
|
||||
navigate({ search: queryParams.toString() }, { replace: true });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// useEffect(() => {
|
||||
// const askNotificationPermission = async () => {
|
||||
|
||||
Reference in New Issue
Block a user