diff --git a/pages/room/[id].tsx b/pages/room/[id].tsx index 75aff7c..69574d7 100644 --- a/pages/room/[id].tsx +++ b/pages/room/[id].tsx @@ -193,8 +193,20 @@ export default function RoomDetail() { setIsShowDetail((value) => !value); }; + const { openModal, closeModal } = useModal(); + const showReporting = () => { - setShowReport(true); + openModal({ + props: { + title: 'Why are you reporting?', + content: "This wan't be shared with the reported user", + buttonName: 'Report', + buttonNames: ['Not a real place', 'Inappropriate content', 'Incorrect information', 'Suspected scammer'], + handleClose: () => { + closeModal(); + }, + }, + }); }; const handleReport = () => { @@ -210,8 +222,6 @@ export default function RoomDetail() { ); }, [room?.maintenance]); - const { openModal, closeModal } = useModal(); - const handleButtonClick = () => { window.history.back(); }; @@ -438,49 +448,9 @@ export default function RoomDetail() { buttonType="wrapper" buttonName="Report" buttonNames={['Not a real place', 'Inappropriate content', 'Incorrect information', 'Suspected scammer']} - handleClose={() => setShowReport(false)} handleCustomEvent={handleReport} /> )} - {/* {showContact && ( - setShowContact(false)} - handleCustomEvent={handleContact} - buttonName="Contact" - disabledBtn={contactDisabled} - > -
-

Do you like this room?

-

-

Contact info

- { - const isValid = isRequired(value, '필수 항목') || isValidEmail(value, `isValidEmail`); - return isValid; - }, - })} - error={errors.email as FieldError} - /> -

Message

-