This commit is contained in:
insvrgent
2025-02-06 02:38:50 +07:00
parent 556c7337eb
commit e2b0ef1046
6 changed files with 243 additions and 159 deletions

View File

@@ -47,12 +47,16 @@ const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMove
if (!isOpen) return null;
// Function to handle clicks on the overlay
const handleOverlayClick = (event) => {
// Close the modal only if the overlay is clicked
onModalCloseFunction();
onClose();
console.log(onModalCloseFunction)
if (onModalCloseFunction) {
onModalCloseFunction(); // Execute the passed closure
}
onClose(); // Close the modal
};
// Function to handle clicks on the modal content
const handleContentClick = (event) => {
// Prevent click event from propagating to the overlay