-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/uchida/832 modal tap off screen #834
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
動作は問題なさそうです!
いくつかコメントしました
/next-project/src/components/sponsoractivities/DetailModal.tsx
でも閉じるようにしてください
const closeModal = () => { | ||
props.setIsOpen(false); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
関数が広い行数にかかって書いてあるととっ散らかって可読性が下がるので、
213行目とかに移動してもらっていいですか
(このコンポーネント自体のコード自体すごく汚くて申し訳ありません)
const closeModal = () => { | ||
props.setIsOpen(false); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こっちも同じ理由で201行とかに移動お願いします
@@ -24,7 +24,7 @@ const SponsorDeleteModal: FC<ModalProps> = (props) => { | |||
}; | |||
|
|||
return ( | |||
<Modal className='md:w-1/2'> | |||
<Modal className='md:w-1/2' onClick={() => props.setShowModal(false)}> | |||
<div className='w-full'> | |||
<div className='ml-auto w-fit'> | |||
<CloseButton onClick={() => props.setShowModal(false)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここも同じ処理をしているので関数にまとめてもらっていいですか?
const closeModal = () => {
props.setIsOpen(false);
};
return ( | ||
<Modal className='md:w-1/2'> | ||
<Modal className='md:w-1/2' onClick={closeModal}> | ||
<div className='w-full'> | ||
<div className='ml-auto mr-5 w-fit'> | ||
<CloseButton onClick={() => props.setIsOpen(false)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
46行目も処理同じなのでonClick={closeModal}
にしてください!
return ( | ||
<Modal className='md:w-1/2'> | ||
<Modal className='md:w-1/2' onClick={closeModal}> | ||
<div className='w-full'> | ||
<div className='ml-auto mr-5 w-fit'> | ||
<CloseButton onClick={() => props.setIsOpen(false)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<CloseButton onClick={() => props.setIsOpen(false)} /> | |
<CloseButton onClick={closeModal}> |
<Modal className='md:w-1/2' onClick={() => props.setShowModal(false)}> | ||
<div className='w-full'> | ||
<div className='ml-auto w-fit'> | ||
<CloseButton onClick={() => props.setShowModal(false)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここもどこかでcloseModal関数を定義して、まとめてもらっていいですか?
const closeModal = () => {
props.setIsOpen(false);
};
協賛企業のモーダルをクリックで閉じるようにする #832
resolve #832
概要
ページでモーダルを閉じるときに✖︎ボタンを押さないと閉じれないから、モーダル外を押すと閉じるようにする
画面スクリーンショット等
URL
スクリーンショット
テスト項目
備考