This commit is contained in:
insvrgent
2025-02-05 12:43:36 +07:00
parent c7deaf2d35
commit 556c7337eb
7 changed files with 154 additions and 121 deletions

View File

@@ -33,7 +33,7 @@ import CreateCoupon from "../pages/CreateCoupon";
import CheckCoupon from "../pages/CheckCoupon";
import CreateUserWithCoupon from "../pages/CreateUserWithCoupon";
const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMoveToTransaction,welcomePageConfig }) => {
const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMoveToTransaction,welcomePageConfig, onModalCloseFunction }) => {
const [shopImg, setShopImg] = useState('');
@@ -49,6 +49,7 @@ const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMove
// Function to handle clicks on the overlay
const handleOverlayClick = (event) => {
// Close the modal only if the overlay is clicked
onModalCloseFunction();
onClose();
};