ok
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user