From 745d2bbe25a1ea5f3f055906760600317ff5c8d4 Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:16:28 +0900 Subject: [PATCH 01/11] =?UTF-8?q?feat:=20=EC=8B=A4=ED=8C=A8=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/matching/FailBox.tsx | 70 +++++++++++++++++++ .../domain/matching/MatchingStateTitle.tsx | 7 ++ .../domain/matching/MatchingTemplete.tsx | 1 + .../domain/matching/buttons/EndButton.tsx | 20 +++--- src/lib/api/meeting.ts | 2 +- src/pages/MatchingPage.tsx | 5 +- 6 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 src/components/domain/matching/FailBox.tsx diff --git a/src/components/domain/matching/FailBox.tsx b/src/components/domain/matching/FailBox.tsx new file mode 100644 index 0000000..ee9f09d --- /dev/null +++ b/src/components/domain/matching/FailBox.tsx @@ -0,0 +1,70 @@ +import { MatchingFail } from '@/assets/img'; +import styled from 'styled-components'; + +function FailBox() { + return ( + <> + <> + + + 매칭에 실패하였습니다. +
+ 다시 매칭할까요? +
+ + + 후기작성 + + + 신고하기 + + + + + ); +} + +export const MatchingImg = styled.img` + width: 140px; + margin-bottom: 20px; +`; +export const StringEle = styled.p` + line-height: 26px; +`; + +export const Actions = styled.div` + display: flex; + margin-top: 18px; + + & > a { + display: flex; + justify-content: center; + align-items: center; + font-size: 12px; + color: rgba(0, 0, 0, 0.6); + width: 100%; + height: 28px; + } +`; + +const ReviewLink = styled.a` + position: relative; + &:after { + position: absolute; + right: 0; + content: ''; + width: 1px; + height: 15px; + background-color: rgba(0, 0, 0, 0.6); + } +`; + +const ReportLink = styled.a``; + +export default FailBox; diff --git a/src/components/domain/matching/MatchingStateTitle.tsx b/src/components/domain/matching/MatchingStateTitle.tsx index cc0a5b2..1191333 100644 --- a/src/components/domain/matching/MatchingStateTitle.tsx +++ b/src/components/domain/matching/MatchingStateTitle.tsx @@ -40,6 +40,13 @@ function MatchingStateTitle(state: string) { 완료되었습니다! ), + fail: ( + + 매칭에 +
+ 실패하였습니다. +
+ ), }[state] } diff --git a/src/components/domain/matching/MatchingTemplete.tsx b/src/components/domain/matching/MatchingTemplete.tsx index 18e9653..59f5f43 100644 --- a/src/components/domain/matching/MatchingTemplete.tsx +++ b/src/components/domain/matching/MatchingTemplete.tsx @@ -124,6 +124,7 @@ const MatchingTemplete = ({ meeting, dating, btnName, title, handleStatus }: Mat success: , pay: , end: , + fail: , }[btnName] } diff --git a/src/components/domain/matching/buttons/EndButton.tsx b/src/components/domain/matching/buttons/EndButton.tsx index 20dccba..b289e3b 100644 --- a/src/components/domain/matching/buttons/EndButton.tsx +++ b/src/components/domain/matching/buttons/EndButton.tsx @@ -1,9 +1,9 @@ import { Button, Modal } from '@/components/base'; import { useToggle } from '@/hooks/common'; -import { postReMatchMettingSurvey } from '@/lib/api/meeting'; +import { postReMatchMeetingSurvey } from '@/lib/api/meeting'; import { postReMatchDatingSurvey } from '@/lib/api/dating'; -import { useMatch } from 'react-router-dom'; -import React from 'react'; +import { useLocation } from 'react-router-dom'; +import React, { useState } from 'react'; import { Status } from '@/pages/MatchingPage'; interface EndButtonProps { @@ -11,16 +11,18 @@ interface EndButtonProps { } function EndButton({ handleStatus }: EndButtonProps) { + const location = useLocation(); const [isErrorModal, onToggleErrorModal] = useToggle(); - const matchMeeting = useMatch('/meeting/*'); + const [errorMessage, setErrorMessage] = useState('에러가 발생했습니다😭 다시한번 시도해 주세요!'); const handleClick = async () => { + const matchMeeting = location.pathname.includes('meeting'); try { - const res = matchMeeting ? await postReMatchMettingSurvey() : await postReMatchDatingSurvey(); - if (typeof res === 'number') { - handleStatus('waiting'); - } + matchMeeting ? await postReMatchMeetingSurvey() : await postReMatchDatingSurvey(); + handleStatus('waiting'); } catch (e) { + const { message } = e.response.data; + setErrorMessage(message); onToggleErrorModal(); } }; @@ -35,7 +37,7 @@ function EndButton({ handleStatus }: EndButtonProps) { height={140} bottonName="확인" title="알림" - text="에러가 발생했습니다😭 다시한번 시도해 주세요!" + text={errorMessage} onToggleModal={onToggleErrorModal} onClick={() => { void 0; diff --git a/src/lib/api/meeting.ts b/src/lib/api/meeting.ts index 3b6ba57..097efba 100644 --- a/src/lib/api/meeting.ts +++ b/src/lib/api/meeting.ts @@ -17,7 +17,7 @@ export const patchMeetingSurvey = async (payload: Partial) => { return res.data; }; -export const postReMatchMettingSurvey = async () => { +export const postReMatchMeetingSurvey = async () => { const res = await apiClient.post('/meeting/survey/rematch'); return res.data; }; diff --git a/src/pages/MatchingPage.tsx b/src/pages/MatchingPage.tsx index 9cdbe34..a28d2bc 100644 --- a/src/pages/MatchingPage.tsx +++ b/src/pages/MatchingPage.tsx @@ -10,8 +10,9 @@ import { MeetingPartnerSurvey } from '@/types/meeting'; import { DatingPartnerSurvey } from '@/types/dating'; import MeetingEndBox from '@/components/domain/matching/MeetingEndBox'; import DatingEndBox from '@/components/domain/matching/DatingEndBox'; +import FailBox from '@/components/domain/matching/FailBox'; -export type Status = 'none' | 'waiting' | 'success' | 'pay' | 'end'; +export type Status = 'none' | 'waiting' | 'success' | 'pay' | 'end' | 'fail'; const MatchingPage = () => { const [status, setStatus] = useState('waiting'); @@ -33,6 +34,7 @@ const MatchingPage = () => { success: , pay: , end: , + fail: , }[status] } @@ -46,6 +48,7 @@ const MatchingPage = () => { success: , pay: , end: , + fail: , }[status] } From 5840ee56291a4f789f736ef4d4dfddbe39975f23 Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:27:35 +0900 Subject: [PATCH 02/11] =?UTF-8?q?style:=20=EB=A7=A4=EC=B9=AD=20=EA=B2=B0?= =?UTF-8?q?=EA=B3=BC=20=ED=99=95=EC=9D=B8=ED=95=98=EA=B8=B0=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/landing/LandingContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/domain/landing/LandingContainer.tsx b/src/components/domain/landing/LandingContainer.tsx index f0b60f9..b3f6814 100644 --- a/src/components/domain/landing/LandingContainer.tsx +++ b/src/components/domain/landing/LandingContainer.tsx @@ -46,7 +46,7 @@ function LandingContainer() { 시작하기 navigate('/matching/meeting')}> - 매칭 결과 확인 + 매칭 결과 확인하기 )} From ae61be9fa477af0d432e5438d247e25af48abc8a Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:27:48 +0900 Subject: [PATCH 03/11] =?UTF-8?q?feat:=20=EC=95=84=EB=9E=98=20=EA=B3=84?= =?UTF-8?q?=EC=A2=8C=EB=A1=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/matching/SuccessBox.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/domain/matching/SuccessBox.tsx b/src/components/domain/matching/SuccessBox.tsx index a5fe0be..ce26fbd 100644 --- a/src/components/domain/matching/SuccessBox.tsx +++ b/src/components/domain/matching/SuccessBox.tsx @@ -15,7 +15,8 @@ function SuccessBox({ payDeadline }: SuccessBoxProps) { <> - {dateLabel}까지 10,000원을 결제해주시면 + {dateLabel}까지 아래 계좌로 +
1000원을 결제해주시면
카톡 아이디가 전달됩니다.
From bf55a589b66677ac3f3c0c1b48ddf9f47a9d6b31 Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:38:23 +0900 Subject: [PATCH 04/11] =?UTF-8?q?feat:=20=EB=A7=A4=EC=B9=AD=20=EC=84=B1?= =?UTF-8?q?=EC=82=AC=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=AC=B8=EA=B5=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95,=20=EB=B3=B5=EC=82=AC=20=EA=B8=B0=EB=8A=A5?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/CopyWhiteIcon.png | Bin 0 -> 458 bytes src/assets/img/index.ts | 1 + .../domain/matching/buttons/SuccessButton.tsx | 77 ++++++++++++++++-- src/pages/MatchingPage.tsx | 2 +- 4 files changed, 73 insertions(+), 7 deletions(-) create mode 100644 src/assets/img/CopyWhiteIcon.png diff --git a/src/assets/img/CopyWhiteIcon.png b/src/assets/img/CopyWhiteIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..792d0937ed6e219f430d1fb3460a1250e20f7972 GIT binary patch literal 458 zcmV;*0X6=KP)VBuP@@uuPQ@hHs@*HPbg}Vw-wP!cwPp2JKxC zCT2KXQ;P`8G_^TsQBlMz)RKu`sS3hSqpqA+Gb8IFoj1st0>*@*%Odmq>{A=m6#V$5 zDm+P#nT!|{_tY+W9QPq<@^{Z@<~*HnDa`@37tn-8XZ4h3=F$n5(yWR268@*@gxaEJ z(f+IWay25erfYi(5155RV??8RZ8B1#5u0elCK|DcMr@)H8)@W|`Zw_ha;9_X@iMFN zLekC8Ds_jP>AHPs<^dyOqI%XJ5g(g=!iTbm8^~bfiE5(V-jxv!{qFRVesC$xGj##s zJ^=635ueGwbi%nIW=ZBbEWp2s)|*#pqK-%(S^`h4ny+<6@Bjb+07*qoM6N<$g4U10 AO8@`> literal 0 HcmV?d00001 diff --git a/src/assets/img/index.ts b/src/assets/img/index.ts index 22002f1..76cc1a5 100644 --- a/src/assets/img/index.ts +++ b/src/assets/img/index.ts @@ -10,5 +10,6 @@ export { default as MatchingSuccess } from './MatchingSuccess.png'; export { default as Waiting } from './Waiting.png'; export { default as Complete } from './Complete.png'; export { default as CopyIcon } from './CopyIcon.png'; +export { default as CopyWhiteIcon } from './CopyWhiteIcon.png'; export { default as TripleLineMenu } from './TripleLineMenu.png'; export { default as Logout } from './Logout.png'; diff --git a/src/components/domain/matching/buttons/SuccessButton.tsx b/src/components/domain/matching/buttons/SuccessButton.tsx index 6e5081e..22e3aa7 100644 --- a/src/components/domain/matching/buttons/SuccessButton.tsx +++ b/src/components/domain/matching/buttons/SuccessButton.tsx @@ -1,15 +1,80 @@ -import { Button } from '@/components/base'; import React from 'react'; +import { Button } from '@/components/base'; +import { CopyWhiteIcon } from '@/assets/img'; +import styled from 'styled-components'; +import { Modal } from '@/components/base'; +import { useToggle } from '@/hooks/common'; function SuccessButton() { - const handleClick = () => { - console.log('asd'); + const [isModal, onToggleModal] = useToggle(); + const [isErrorModal, onToggleErrorModal] = useToggle(); + + const handleCopy = async (text: string) => { + try { + onToggleModal(); + await navigator.clipboard.writeText(text); + } catch (e) { + onToggleErrorModal(); + } }; return ( - + + + + 받는 분 통장 표시는 카톡 아이디 첫 7자리로 해주세요!
+ (ex: minsu30) +
+ {isModal && ( + { + void 0; + }} + /> + )} + {isErrorModal && ( + { + void 0; + }} + /> + )} +
); } +const SuccessButtonBlock = styled.section` + display: flex; + flex-direction: column; + width: 100%; +`; + +const Text = styled.span` + margin-left: 5px; +`; + +const Warning = styled.strong` + text-align: center; + font-size: 12px; + margin-top: 7px; + line-height: 1.2; + + span { + color: #ff0000; + } +`; + export default SuccessButton; diff --git a/src/pages/MatchingPage.tsx b/src/pages/MatchingPage.tsx index 9cdbe34..c805e50 100644 --- a/src/pages/MatchingPage.tsx +++ b/src/pages/MatchingPage.tsx @@ -14,7 +14,7 @@ import DatingEndBox from '@/components/domain/matching/DatingEndBox'; export type Status = 'none' | 'waiting' | 'success' | 'pay' | 'end'; const MatchingPage = () => { - const [status, setStatus] = useState('waiting'); + const [status, setStatus] = useState('success'); const handleStatus = (status: Status) => setStatus(status); From e8098acf93415b763c8458c97cde115c49485905 Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:44:46 +0900 Subject: [PATCH 05/11] =?UTF-8?q?fix:=20=EB=9E=9C=EB=8D=A4=20=EB=A7=A4?= =?UTF-8?q?=EC=B9=AD=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/matching/MatchingTemplete.tsx | 1 - src/components/domain/matching/WaitingBox.tsx | 9 +-------- src/pages/MatchingPage.tsx | 2 +- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/components/domain/matching/MatchingTemplete.tsx b/src/components/domain/matching/MatchingTemplete.tsx index 18e9653..f8df6dc 100644 --- a/src/components/domain/matching/MatchingTemplete.tsx +++ b/src/components/domain/matching/MatchingTemplete.tsx @@ -120,7 +120,6 @@ const MatchingTemplete = ({ meeting, dating, btnName, title, handleStatus }: Mat { { none: , - waiting: , success: , pay: , end: , diff --git a/src/components/domain/matching/WaitingBox.tsx b/src/components/domain/matching/WaitingBox.tsx index 5bd44d0..7cbfa10 100644 --- a/src/components/domain/matching/WaitingBox.tsx +++ b/src/components/domain/matching/WaitingBox.tsx @@ -9,11 +9,8 @@ function WaitingBox() { 매칭은 매일밤 10시에 이루어집니다.
- 매칭이 되면 카톡과 이메일로 링크를 보내드릴게요. + 매칭이 되면 이메일로 링크를 보내드릴게요.
- - 랜덤매칭으로 이상형 반영없이
바로 매칭받을 수 있어요 -
); } @@ -25,9 +22,5 @@ export const MatchingImg = styled.img` export const StringEle = styled.p` line-height: 26px; `; -export const MarginTopEle = styled.p` - margin-top: 50px; - line-height: 22px; -`; export default WaitingBox; diff --git a/src/pages/MatchingPage.tsx b/src/pages/MatchingPage.tsx index c805e50..9cdbe34 100644 --- a/src/pages/MatchingPage.tsx +++ b/src/pages/MatchingPage.tsx @@ -14,7 +14,7 @@ import DatingEndBox from '@/components/domain/matching/DatingEndBox'; export type Status = 'none' | 'waiting' | 'success' | 'pay' | 'end'; const MatchingPage = () => { - const [status, setStatus] = useState('success'); + const [status, setStatus] = useState('waiting'); const handleStatus = (status: Status) => setStatus(status); From 24d4570aabf4426eaf528873c7c094694958cd40 Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:46:37 +0900 Subject: [PATCH 06/11] =?UTF-8?q?fix:=20=EB=AF=B8=ED=8C=85=20->=20?= =?UTF-8?q?=EB=A7=8C=EB=82=A8=EC=9C=BC=EB=A1=9C=20=EB=AC=B8=EA=B5=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AbroadAreasSurvey.tsx | 2 +- src/pages/DomesticAreasSurvey.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/AbroadAreasSurvey.tsx b/src/pages/AbroadAreasSurvey.tsx index 3d9d0a3..5677d61 100644 --- a/src/pages/AbroadAreasSurvey.tsx +++ b/src/pages/AbroadAreasSurvey.tsx @@ -37,7 +37,7 @@ const AbroadAreasSurvey = () => { handleNextClick={handleNextClick} > - <strong>미팅이 가능한 지역(도시명)</strong>을<br /> + <strong>만남이 가능한 지역(도시명)</strong>을<br /> 모두 알려주세요. { handleNextClick={handleNextClick} > - <strong>미팅이 가능한 지역</strong>을 + <strong>만남이 가능한 지역</strong>을 <br /> 모두 알려주세요. From db95b23d902bc2843fcac25c2233b863ce0a76da Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:47:24 +0900 Subject: [PATCH 07/11] =?UTF-8?q?fix:=20=EC=98=A4=ED=83=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AuthMail.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/AuthMail.tsx b/src/pages/AuthMail.tsx index b3e9e51..5ad5154 100644 --- a/src/pages/AuthMail.tsx +++ b/src/pages/AuthMail.tsx @@ -42,7 +42,7 @@ const AuthMail = () => { 학교 메일로 인증해주세요. - 예시: 1234@bu.du + 예시: 1234@bu.edu From dd7f2d5451ade4b828453ac89b6d42f0a45e394f Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 15:57:08 +0900 Subject: [PATCH 08/11] =?UTF-8?q?feat:=20=EC=B9=B4=ED=86=A1=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/matching/WaitingBox.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/domain/matching/WaitingBox.tsx b/src/components/domain/matching/WaitingBox.tsx index 7cbfa10..30925ea 100644 --- a/src/components/domain/matching/WaitingBox.tsx +++ b/src/components/domain/matching/WaitingBox.tsx @@ -9,7 +9,7 @@ function WaitingBox() { 매칭은 매일밤 10시에 이루어집니다.
- 매칭이 되면 이메일로 링크를 보내드릴게요. + 매칭이 되면 카톡과 이메일로 링크를 보내드릴게요.
); @@ -22,5 +22,9 @@ export const MatchingImg = styled.img` export const StringEle = styled.p` line-height: 26px; `; +export const MarginTopEle = styled.p` + margin-top: 50px; + line-height: 22px; +`; export default WaitingBox; From 511b438a5bdf7a6cf92548cd24497f4ed8b8afdf Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 16:21:47 +0900 Subject: [PATCH 09/11] =?UTF-8?q?feat:=20=EB=A7=88=EC=A7=80=EB=A7=89=20?= =?UTF-8?q?=EC=8A=A4=ED=85=9D=EC=9D=BC=20=EB=95=8C=20=EB=8B=A4=EC=9D=8C=20?= =?UTF-8?q?->=20=EC=A0=9C=EC=B6=9C=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/survey/SurveyTemplate.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/domain/survey/SurveyTemplate.tsx b/src/components/domain/survey/SurveyTemplate.tsx index 6129855..c0fbda8 100644 --- a/src/components/domain/survey/SurveyTemplate.tsx +++ b/src/components/domain/survey/SurveyTemplate.tsx @@ -44,7 +44,7 @@ const SurveyTemplate = ({ variant={disableNext ? 'gray' : 'default'} fontWeight={disableNext ? 400 : 700} > - 다음 + {currStep === totalStep ? '제출' : '다음'} )} @@ -53,6 +53,9 @@ const SurveyTemplate = ({ ); }; +export const LAST_MEETING_STEP = 15; +export const LAST_DATING_STEP = 16; + const SurveyTemplateBlock = styled.div` position: relative; height: 100%; From 8741e9ba53df63e20123786a85e821353f4a21cf Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 16:22:03 +0900 Subject: [PATCH 10/11] =?UTF-8?q?feat:=20=EC=A0=84=EC=B2=B4=EC=A0=81?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=A7=88=EC=A7=80=EB=A7=89=20=EC=8A=A4?= =?UTF-8?q?=ED=85=9D=20=EC=83=81=EC=88=98=EB=A1=9C=20=EA=B4=80=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/AbroadAreasSurvey.tsx | 3 ++- src/pages/AgreementSurvey.tsx | 4 +++- src/pages/AvoidUniversitiesSurvey.tsx | 3 ++- src/pages/ChannelSurvey.tsx | 3 ++- src/pages/DomesticAreasSurvey.tsx | 3 ++- src/pages/GenderAverageAgeSurvey.tsx | 3 ++- src/pages/IsAbroadSurvey.tsx | 6 +++--- src/pages/KakaoIdSurvey.tsx | 5 +++-- src/pages/MindsetSurvey.tsx | 3 ++- src/pages/MyBodySmoke.tsx | 3 ++- src/pages/MyDateCount.tsx | 3 ++- src/pages/MyDepartmentCharacter.tsx | 3 ++- src/pages/MyGenderAge.tsx | 3 ++- src/pages/MyMbtiHeight.tsx | 3 ++- src/pages/OurDepartmentsAverageHeightSurvey.tsx | 3 ++- src/pages/OurUniversitiesSurvey.tsx | 3 ++- src/pages/PlaySurvey.tsx | 3 ++- src/pages/PreferAverageAgeHeightSurvey.tsx | 3 ++- src/pages/PreferBodyDateCountSurvey.tsx | 3 ++- src/pages/PreferDepartmentCharacterSurvey.tsx | 3 ++- src/pages/PreferDepartmentsSurvey.tsx | 3 ++- src/pages/PreferUniversitiesSurvey.tsx | 3 ++- src/pages/TypeOfMeetingSurvey.tsx | 6 ++++-- 23 files changed, 51 insertions(+), 27 deletions(-) diff --git a/src/pages/AbroadAreasSurvey.tsx b/src/pages/AbroadAreasSurvey.tsx index 5677d61..a8be5a2 100644 --- a/src/pages/AbroadAreasSurvey.tsx +++ b/src/pages/AbroadAreasSurvey.tsx @@ -7,6 +7,7 @@ import { Title } from '@/lib/styles/styledComponents'; import SearchSelector from '@/components/domain/survey/SearchSelector'; import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import useAboardAreaLoad from '@/hooks/survey/useAboardAreaLoad'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const AbroadAreasSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -32,7 +33,7 @@ const AbroadAreasSurvey = () => { disableNext={checkDisabled} hasProgressBar={true} currStep={matchMeeting ? 12 : 13} - totalStep={matchMeeting ? 14 : 16} + totalStep={matchMeeting ? LAST_MEETING_STEP : LAST_DATING_STEP} handlePrevClick={() => meetingNavigate(Path.IsAbroadSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/AgreementSurvey.tsx b/src/pages/AgreementSurvey.tsx index 93aed0b..0cbf6c7 100644 --- a/src/pages/AgreementSurvey.tsx +++ b/src/pages/AgreementSurvey.tsx @@ -12,6 +12,7 @@ import { useDatingNavigate, useMeetingNavigate } from '@/hooks/common/useNavigat import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import { goKakaoLogin } from '@/utils/goKakaoLogin'; import { getOauthKakaoAge } from '@/lib/api/oauth'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const AgreementSurvey = () => { const location = useLocation(); @@ -48,7 +49,8 @@ const AgreementSurvey = () => { return ( meetingNavigate(Path.ChannelSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/AvoidUniversitiesSurvey.tsx b/src/pages/AvoidUniversitiesSurvey.tsx index 12ba011..5218109 100644 --- a/src/pages/AvoidUniversitiesSurvey.tsx +++ b/src/pages/AvoidUniversitiesSurvey.tsx @@ -8,6 +8,7 @@ import Path from '@/router/Path'; import { useDatingNavigate, useMeetingNavigate } from '@/hooks/common/useNavigate'; import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import useUnivLoad from '@/hooks/survey/useUnivLoad'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const AvoidUniversitiesSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -36,7 +37,7 @@ const AvoidUniversitiesSurvey = () => { { const matchMeeting = useMatch('/meeting/*'); @@ -39,7 +40,7 @@ const ChannelSurvey = () => { disableNext={matchMeeting ? !isChecked : !isCheckedDating} hasProgressBar={true} currStep={matchMeeting ? 13 : 14} - totalStep={matchMeeting ? 14 : 16} + totalStep={matchMeeting ? LAST_MEETING_STEP : LAST_DATING_STEP} handlePrevClick={() => meetingNavigate(Path.IsAbroadSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/DomesticAreasSurvey.tsx b/src/pages/DomesticAreasSurvey.tsx index bfc116c..29ebb23 100644 --- a/src/pages/DomesticAreasSurvey.tsx +++ b/src/pages/DomesticAreasSurvey.tsx @@ -10,6 +10,7 @@ import { useMeetingNavigate, useDatingNavigate } from '@/hooks/common/useNavigat import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import { type DomesticAreas } from '@/types/meeting'; import { useMatch } from 'react-router-dom'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const DomesticAreasSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -46,7 +47,7 @@ const DomesticAreasSurvey = () => { meetingNavigate(Path.IsAbroadSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/GenderAverageAgeSurvey.tsx b/src/pages/GenderAverageAgeSurvey.tsx index 97e64d9..ff85ff3 100644 --- a/src/pages/GenderAverageAgeSurvey.tsx +++ b/src/pages/GenderAverageAgeSurvey.tsx @@ -12,6 +12,7 @@ import { type Gender } from '@/types/meeting'; import { useRecoilValue } from 'recoil'; import { meetingState } from '@/atoms/meetingState'; import { conversionTypeOfMeeting } from '@/utils/converson'; +import { LAST_MEETING_STEP } from '@/components/domain/survey/SurveyTemplate'; const GenderAverageAgeSurvey = () => { const navigate = useNavigate(); @@ -37,7 +38,7 @@ const GenderAverageAgeSurvey = () => { navigate(Path.TypeOfMeetingSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/IsAbroadSurvey.tsx b/src/pages/IsAbroadSurvey.tsx index 9152b70..4a74fd4 100644 --- a/src/pages/IsAbroadSurvey.tsx +++ b/src/pages/IsAbroadSurvey.tsx @@ -1,5 +1,4 @@ -/* eslint-disable react/no-children-prop */ -import React, { useState, useMemo } from 'react'; +import React, { useState } from 'react'; import { ChooseTwoBox, SurveyTemplate } from '@/components/domain/survey'; import { Title } from '@/lib/styles/styledComponents'; import styled from 'styled-components'; @@ -10,6 +9,7 @@ import { COUNTRY_ITEMS } from '@/types/constants/area'; import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import { useMatch } from 'react-router-dom'; import { type Location } from '@/types/meeting'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const IsAbroadSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -44,7 +44,7 @@ const IsAbroadSurvey = () => { disableNext={false} hasProgressBar={true} currStep={matchMeeting ? 11 : 12} - totalStep={matchMeeting ? 14 : 16} + totalStep={matchMeeting ? LAST_MEETING_STEP : LAST_DATING_STEP} handlePrevClick={handlePrevClick} handleNextClick={handleNextClick} > diff --git a/src/pages/KakaoIdSurvey.tsx b/src/pages/KakaoIdSurvey.tsx index 8d89177..0ba4566 100644 --- a/src/pages/KakaoIdSurvey.tsx +++ b/src/pages/KakaoIdSurvey.tsx @@ -12,6 +12,7 @@ import { useDatingNavigate, useMeetingNavigate } from '@/hooks/common/useNavigat import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import { postMeetingSurvey } from '@/lib/api/meeting'; import { postDatingSurvey } from '@/lib/api/dating'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const KakaoIdSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -50,8 +51,8 @@ const KakaoIdSurvey = () => { meetingNavigate(Path.AgreementSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/MindsetSurvey.tsx b/src/pages/MindsetSurvey.tsx index 9fdb79a..88f5477 100644 --- a/src/pages/MindsetSurvey.tsx +++ b/src/pages/MindsetSurvey.tsx @@ -8,6 +8,7 @@ import Path from '@/router/Path'; import { useMeetingNavigate } from '@/hooks/common/useNavigate'; import { useMeetingSessionState } from '@/hooks/common'; import { type MindSet } from '@/types/meeting'; +import { LAST_MEETING_STEP } from '@/components/domain/survey/SurveyTemplate'; const MindsetSurvey = () => { const meetingNavigate = useMeetingNavigate(); @@ -31,7 +32,7 @@ const MindsetSurvey = () => { meetingNavigate(Path.PreferDepartmentsSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/MyBodySmoke.tsx b/src/pages/MyBodySmoke.tsx index fa97505..00f7072 100644 --- a/src/pages/MyBodySmoke.tsx +++ b/src/pages/MyBodySmoke.tsx @@ -7,6 +7,7 @@ import { MYBODY_ITEMS } from '@/types/constants/body'; import { useDatingSessionState } from '@/hooks/common'; import { type Body } from '@/types/dating'; import styled from 'styled-components'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const MyBodySmoke = () => { const datingNavigate = useDatingNavigate(); @@ -31,7 +32,7 @@ const MyBodySmoke = () => { datingNavigate(Path.MyMbtiHeight)} handleNextClick={handleNextClick} diff --git a/src/pages/MyDateCount.tsx b/src/pages/MyDateCount.tsx index 38df637..04eec91 100644 --- a/src/pages/MyDateCount.tsx +++ b/src/pages/MyDateCount.tsx @@ -7,6 +7,7 @@ import { SMOKEOK_ITEMS } from '@/types/constants/smoke'; import { useDatingSessionState } from '@/hooks/common'; import { type DateCount } from '@/types/dating'; import styled from 'styled-components'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const MyDateCount = () => { const datingNavigate = useDatingNavigate(); @@ -31,7 +32,7 @@ const MyDateCount = () => { datingNavigate(Path.MyBodySmoke)} handleNextClick={handleNextClick} diff --git a/src/pages/MyDepartmentCharacter.tsx b/src/pages/MyDepartmentCharacter.tsx index 9d13dd5..7333e46 100644 --- a/src/pages/MyDepartmentCharacter.tsx +++ b/src/pages/MyDepartmentCharacter.tsx @@ -9,6 +9,7 @@ import { useDatingNavigate } from '@/hooks/common/useNavigate'; import { useDatingSessionState } from '@/hooks/common'; import { type Departments } from '@/types/meeting'; import { type Characteristic } from '@/types/dating'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const MyDepartmentCharacter = () => { const datingNavigate = useDatingNavigate(); @@ -28,7 +29,7 @@ const MyDepartmentCharacter = () => { datingNavigate(Path.MyGenderAge)} handleNextClick={handleNextClick} > diff --git a/src/pages/MyGenderAge.tsx b/src/pages/MyGenderAge.tsx index 5be26ba..dfb8675 100644 --- a/src/pages/MyGenderAge.tsx +++ b/src/pages/MyGenderAge.tsx @@ -9,6 +9,7 @@ import { useDatingNavigate } from '@/hooks/common/useNavigate'; import { useDatingSessionState } from '@/hooks/common'; import { GENDER_ITEMS } from '@/types/constants/constant'; import { type Gender } from '@/types/meeting'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const MyGenderAge = () => { const navigate = useNavigate(); @@ -33,7 +34,7 @@ const MyGenderAge = () => { navigate(Path.TypeOfMeetingSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/MyMbtiHeight.tsx b/src/pages/MyMbtiHeight.tsx index 01507ee..46813a7 100644 --- a/src/pages/MyMbtiHeight.tsx +++ b/src/pages/MyMbtiHeight.tsx @@ -7,6 +7,7 @@ import { palette } from '@/lib/styles/palette'; import Path from '@/router/Path'; import { useDatingNavigate } from '@/hooks/common/useNavigate'; import { useDatingSessionState } from '@/hooks/common'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const MyMbtiHeight = () => { const datingNavigate = useDatingNavigate(); @@ -47,7 +48,7 @@ const MyMbtiHeight = () => { datingNavigate(Path.MyDepartmentCharacter)} handleNextClick={handleNextClick} > diff --git a/src/pages/OurDepartmentsAverageHeightSurvey.tsx b/src/pages/OurDepartmentsAverageHeightSurvey.tsx index bdbab31..84935b6 100644 --- a/src/pages/OurDepartmentsAverageHeightSurvey.tsx +++ b/src/pages/OurDepartmentsAverageHeightSurvey.tsx @@ -8,6 +8,7 @@ import Path from '@/router/Path'; import { useMeetingNavigate } from '@/hooks/common/useNavigate'; import { useMeetingSessionState } from '@/hooks/common'; import { type Departments } from '@/types/meeting'; +import { LAST_MEETING_STEP } from '@/components/domain/survey/SurveyTemplate'; const OurDepartmentsAverageHeightSurvey = () => { const meetingNavigate = useMeetingNavigate(); @@ -38,7 +39,7 @@ const OurDepartmentsAverageHeightSurvey = () => { meetingNavigate(Path.OurUniversitiesSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/OurUniversitiesSurvey.tsx b/src/pages/OurUniversitiesSurvey.tsx index 66d7a29..7c611f6 100644 --- a/src/pages/OurUniversitiesSurvey.tsx +++ b/src/pages/OurUniversitiesSurvey.tsx @@ -8,6 +8,7 @@ import { useMeetingSessionState } from '@/hooks/common'; import useUnivLoad from '@/hooks/survey/useUnivLoad'; import styled from 'styled-components'; import { palette } from '@/lib/styles/palette'; +import { LAST_MEETING_STEP } from '@/components/domain/survey/SurveyTemplate'; const OurUniversitiesSurvey = () => { const meetingNavigate = useMeetingNavigate(); @@ -41,7 +42,7 @@ const OurUniversitiesSurvey = () => { meetingNavigate(Path.GenderAverageAgeSurvey)} handleNextClick={handleNextClick} diff --git a/src/pages/PlaySurvey.tsx b/src/pages/PlaySurvey.tsx index e1f49fc..544ae66 100644 --- a/src/pages/PlaySurvey.tsx +++ b/src/pages/PlaySurvey.tsx @@ -8,6 +8,7 @@ import Path from '@/router/Path'; import { useMeetingNavigate } from '@/hooks/common/useNavigate'; import { useMeetingSessionState } from '@/hooks/common'; import { type Play } from '@/types/meeting'; +import { LAST_MEETING_STEP } from '@/components/domain/survey/SurveyTemplate'; const PlaySurvey = () => { const meetingNavigate = useMeetingNavigate(); @@ -31,7 +32,7 @@ const PlaySurvey = () => { meetingNavigate(Path.MindsetSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/PreferAverageAgeHeightSurvey.tsx b/src/pages/PreferAverageAgeHeightSurvey.tsx index f920030..b3feb8e 100644 --- a/src/pages/PreferAverageAgeHeightSurvey.tsx +++ b/src/pages/PreferAverageAgeHeightSurvey.tsx @@ -7,6 +7,7 @@ import { useMatch } from 'react-router-dom'; import { useDatingNavigate, useMeetingNavigate } from '@/hooks/common/useNavigate'; import { useMeetingSessionState } from '@/hooks/common'; import Path from '@/router/Path'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const PreferAverageAgeHeightSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -27,7 +28,7 @@ const PreferAverageAgeHeightSurvey = () => { return ( meetingNavigate(Path.PreferUniversitiesSurvey)} handleNextClick={handleNextClick} diff --git a/src/pages/PreferBodyDateCountSurvey.tsx b/src/pages/PreferBodyDateCountSurvey.tsx index 18a8a22..d14435f 100644 --- a/src/pages/PreferBodyDateCountSurvey.tsx +++ b/src/pages/PreferBodyDateCountSurvey.tsx @@ -7,6 +7,7 @@ import { PREFER_BODY_ITEMS } from '@/types/constants/body'; import { PREFER_DCOUNT_ITEMS } from '@/types/constants/dcount'; import { useDatingSessionState } from '@/hooks/common'; import { type DateCount, type Body } from '@/types/dating'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const PreferBodyDateCountSurvey = () => { const datingNavigate = useDatingNavigate(); @@ -39,7 +40,7 @@ const PreferBodyDateCountSurvey = () => { datingNavigate(Path.PreferDepartmentCharacterSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/PreferDepartmentCharacterSurvey.tsx b/src/pages/PreferDepartmentCharacterSurvey.tsx index ec962eb..60c2ed7 100644 --- a/src/pages/PreferDepartmentCharacterSurvey.tsx +++ b/src/pages/PreferDepartmentCharacterSurvey.tsx @@ -8,6 +8,7 @@ import { PREFER_CHARACTER_ITEMS, CHARACTER_ITEM } from '@/types/constants/charac import { useDatingSessionState } from '@/hooks/common'; import { type Departments } from '@/types/meeting'; import { type Characteristic } from '@/types/dating'; +import { LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const PreferDepartmentCharacterSurvey = () => { const datingNavigate = useDatingNavigate(); @@ -51,7 +52,7 @@ const PreferDepartmentCharacterSurvey = () => { datingNavigate(Path.PreferAgeHeightSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/PreferDepartmentsSurvey.tsx b/src/pages/PreferDepartmentsSurvey.tsx index 109a82c..468bb3a 100644 --- a/src/pages/PreferDepartmentsSurvey.tsx +++ b/src/pages/PreferDepartmentsSurvey.tsx @@ -8,6 +8,7 @@ import { useMeetingNavigate } from '@/hooks/common/useNavigate'; import { useMeetingSessionState } from '@/hooks/common'; import Path from '@/router/Path'; import { type Departments } from '@/types/meeting'; +import { LAST_MEETING_STEP } from '@/components/domain/survey/SurveyTemplate'; const PreferDepartmentsSurvey = () => { const meetingNavigate = useMeetingNavigate(); @@ -37,7 +38,7 @@ const PreferDepartmentsSurvey = () => { meetingNavigate(Path.PreferAgeHeightSurvey)} handleNextClick={handleNextClick} > diff --git a/src/pages/PreferUniversitiesSurvey.tsx b/src/pages/PreferUniversitiesSurvey.tsx index 16f262f..ae4b7b8 100644 --- a/src/pages/PreferUniversitiesSurvey.tsx +++ b/src/pages/PreferUniversitiesSurvey.tsx @@ -7,6 +7,7 @@ import { useDatingNavigate, useMeetingNavigate } from '@/hooks/common/useNavigat import Path from '@/router/Path'; import { useMeetingSessionState, useDatingSessionState } from '@/hooks/common'; import useUnivLoad from '@/hooks/survey/useUnivLoad'; +import { LAST_MEETING_STEP, LAST_DATING_STEP } from '@/components/domain/survey/SurveyTemplate'; const PreferUniversitiesSurvey = () => { const matchMeeting = useMatch('/meeting/*'); @@ -35,7 +36,7 @@ const PreferUniversitiesSurvey = () => { { const navigate = useNavigate(); @@ -15,6 +16,7 @@ const TypeOfMeetingSurvey = () => { const datingNavigate = useDatingNavigate(); const { initMeetingState, setMeetingData } = useMeetingSessionState(); const [checkedOption, setCheckedOption] = useState(initMeetingState?.typeOfMeeting); + const matchMeeting = useMatch('/meeting/*'); const handleNextClick = () => { if (initMeetingState) { @@ -40,7 +42,7 @@ const TypeOfMeetingSurvey = () => { navigate(Path.LandingPage)} handleNextClick={handleNextClick} > From f00830538f84298385c0961bd6c885ba106058fc Mon Sep 17 00:00:00 2001 From: Jiyoung Kim Date: Sat, 30 Jul 2022 16:22:16 +0900 Subject: [PATCH 11/11] =?UTF-8?q?feat:=20=EC=95=88=EC=93=B0=EB=8A=94=20imp?= =?UTF-8?q?ort=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/domain/matching/MatchingTemplete.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/domain/matching/MatchingTemplete.tsx b/src/components/domain/matching/MatchingTemplete.tsx index f8df6dc..6cad201 100644 --- a/src/components/domain/matching/MatchingTemplete.tsx +++ b/src/components/domain/matching/MatchingTemplete.tsx @@ -6,7 +6,6 @@ import { Title } from '@/lib/styles/styledComponents'; import CompleteButton from './buttons/CompleteButton'; import EndButton from './buttons/EndButton'; import NoneButton from './buttons/NoneButton'; -import WaitingButton from './buttons/WaitingButton'; import SuccessButton from './buttons/SuccessButton'; import Path from '@/router/Path'; import { Status } from '@/pages/MatchingPage';