Skip to content

Commit eab9158

Browse files
committed
hide modal with outside click
1 parent 1fd4efc commit eab9158

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/shared/components/Gigs/GigDetails/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default function GigDetails(props) {
226226
}
227227
</div>
228228
{
229-
isLoginModalOpen && <LoginModal retUrl={retUrl} />
229+
isLoginModalOpen && <LoginModal retUrl={retUrl} onCancel={() => setLoginModalOpen(false)} />
230230
}
231231
</div>
232232
</div>

src/shared/components/Gigs/LoginModal/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ const buttonThemes = {
1919
tc,
2020
};
2121

22-
function LoginModal({ retUrl }) {
22+
function LoginModal({ retUrl, onCancel }) {
2323
return (
2424
<Modal
2525
theme={modalStyle}
26+
onCancel={onCancel}
2627
>
2728
<div className={modalStyle.loginRequired}>
2829
<h3 className={modalStyle.title}>WARNING</h3>
@@ -47,6 +48,7 @@ function LoginModal({ retUrl }) {
4748

4849
LoginModal.propTypes = {
4950
retUrl: PT.string.isRequired,
51+
onCancel: PT.func.isRequired,
5052
};
5153

5254
export default LoginModal;

0 commit comments

Comments
 (0)