-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -425,8 +425,12 @@ export default function SponsorActivitiesAddModal(props: Props) { | |
); | ||
}; | ||
|
||
const closeModal = () => { | ||
props.setIsOpen(false); | ||
}; | ||
Comment on lines
+428
to
+430
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こっちも同じ理由で201行とかに移動お願いします |
||
|
||
return ( | ||
<Modal className='md:w-1/2'> | ||
<Modal className='md:w-1/2' onClick={closeModal}> | ||
<div className='w-full'> | ||
<div className='ml-auto w-fit'> | ||
<CloseButton | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. ここも同じ処理をしているので関数にまとめてもらっていいですか?
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,12 @@ export default function SponsorEditModal(props: Props) { | |
|
||
const [isChecked, setIsChecked] = useState<boolean>(true); | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. 46行目も処理同じなので |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ const SponsorStyleDeleteModal: 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)} /> | ||
Comment on lines
+27
to
30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここもどこかでcloseModal関数を定義して、まとめてもらっていいですか?
|
||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -39,8 +39,12 @@ export default function SponsorAddModal(props: ModalProps) { | |||||
router.reload(); | ||||||
}; | ||||||
|
||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
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行目とかに移動してもらっていいですか
(このコンポーネント自体のコード自体すごく汚くて申し訳ありません)