Skip to content

Commit

Permalink
editing onClose finction
Browse files Browse the repository at this point in the history
  • Loading branch information
TalBenAvi committed Feb 18, 2024
1 parent 12edf1d commit aed517e
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const ProvisionsPopup = () => {
const gtmEventClickReadMore = () => gtmEvent("Provisions popup click");
const gtmEventClickClose = () => gtmEvent("Provisions popup close");

const onClose = () => {
const onClose = (event: React.MouseEvent) => {
event.stopPropagation();
gtmEventClickClose();
toggleModal();
};
Expand All @@ -33,7 +34,7 @@ const ProvisionsPopup = () => {
right="0"
left="0"
backgroundColor="rgba(0,0,0,0.7)"
onClick={onClose}
onClick={(e) => onClose(e)}
>
<Box
pos="fixed"
Expand Down Expand Up @@ -63,10 +64,7 @@ const ProvisionsPopup = () => {
width="28px"
height="28px"
style={{ backgroundColor: "transparent" }}
onClick={(e) => {
e.stopPropagation();
onClose();
}}
onClick={(e) => onClose(e)}
>
<CloseIcon />
</IconButton>
Expand Down

0 comments on commit aed517e

Please sign in to comment.