ok
This commit is contained in:
@@ -35,6 +35,7 @@ import CreateUserWithCoupon from "../pages/CreateUserWithCoupon";
|
||||
const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMoveToTransaction,welcomePageConfig, onModalCloseFunction }) => {
|
||||
|
||||
const [shopImg, setShopImg] = useState('');
|
||||
const [updateKey, setUpdateKey] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
if (welcomePageConfig) {
|
||||
@@ -43,6 +44,10 @@ const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMove
|
||||
}
|
||||
}, [welcomePageConfig]);
|
||||
|
||||
useEffect(() => {
|
||||
setUpdateKey(updateKey+1);
|
||||
}, [shop]);
|
||||
|
||||
if (!isOpen) return null;
|
||||
|
||||
// Function to handle clicks on the overlay
|
||||
@@ -63,7 +68,7 @@ const Modal = ({ user, shop, isOpen, onClose, modalContent, setModal, handleMove
|
||||
};
|
||||
if(modalContent == '') handleOverlayClick();
|
||||
return (
|
||||
<div onClick={handleOverlayClick} className={styles.modalOverlay}>
|
||||
<div key={updateKey} onClick={handleOverlayClick} className={styles.modalOverlay}>
|
||||
<div className={styles.modalContent} onClick={handleContentClick}>
|
||||
|
||||
{modalContent === "edit_account" && <AccountUpdatePage user={user} />}
|
||||
|
||||
Reference in New Issue
Block a user