From 474badead37bbf17cbd6329e168619e2ee5693e2 Mon Sep 17 00:00:00 2001 From: badahertz52 Date: Tue, 20 Aug 2024 15:53:14 +0900 Subject: [PATCH 1/3] =?UTF-8?q?refactor=20:=20AnswerListRecheckModal=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=20=EC=9D=B4=EB=8F=99=20=EB=B0=8F=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EB=A6=AC=ED=8C=A9=ED=86=A0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/index.tsx | 1 - .../components/QuestionCard/index.tsx | 0 .../components/QuestionCard/styles.ts | 0 .../components/ReviewCard}/index.tsx | 6 +++--- .../components/ReviewCard}/styles.ts | 0 .../AnswerListRecheckModal/index.tsx | 19 ++++++++----------- .../AnswerListRecheckModal/styles.ts | 3 ++- .../components/CardForm/index.tsx | 8 +++----- .../components/index.tsx | 7 +++++++ 9 files changed, 23 insertions(+), 21 deletions(-) rename frontend/src/{ => pages/ReviewWritingCardFromPage}/components/AnswerListRecheckModal/components/QuestionCard/index.tsx (100%) rename frontend/src/{ => pages/ReviewWritingCardFromPage}/components/AnswerListRecheckModal/components/QuestionCard/styles.ts (100%) rename frontend/src/{components/AnswerListRecheckModal/components/ReviewWritingCard => pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/ReviewCard}/index.tsx (60%) rename frontend/src/{components/AnswerListRecheckModal/components/ReviewWritingCard => pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/ReviewCard}/styles.ts (100%) rename frontend/src/{ => pages/ReviewWritingCardFromPage}/components/AnswerListRecheckModal/index.tsx (78%) rename frontend/src/{ => pages/ReviewWritingCardFromPage}/components/AnswerListRecheckModal/styles.ts (91%) create mode 100644 frontend/src/pages/ReviewWritingCardFromPage/components/index.tsx diff --git a/frontend/src/components/index.tsx b/frontend/src/components/index.tsx index c20870161..8d8b4e2ad 100644 --- a/frontend/src/components/index.tsx +++ b/frontend/src/components/index.tsx @@ -1,4 +1,3 @@ export * from './layouts'; export * from './common'; export * from './error'; -export { default as AnswerListRecheckModal } from './AnswerListRecheckModal'; diff --git a/frontend/src/components/AnswerListRecheckModal/components/QuestionCard/index.tsx b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/QuestionCard/index.tsx similarity index 100% rename from frontend/src/components/AnswerListRecheckModal/components/QuestionCard/index.tsx rename to frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/QuestionCard/index.tsx diff --git a/frontend/src/components/AnswerListRecheckModal/components/QuestionCard/styles.ts b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/QuestionCard/styles.ts similarity index 100% rename from frontend/src/components/AnswerListRecheckModal/components/QuestionCard/styles.ts rename to frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/QuestionCard/styles.ts diff --git a/frontend/src/components/AnswerListRecheckModal/components/ReviewWritingCard/index.tsx b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/ReviewCard/index.tsx similarity index 60% rename from frontend/src/components/AnswerListRecheckModal/components/ReviewWritingCard/index.tsx rename to frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/ReviewCard/index.tsx index 4f044506a..8514a03f9 100644 --- a/frontend/src/components/AnswerListRecheckModal/components/ReviewWritingCard/index.tsx +++ b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/components/ReviewCard/index.tsx @@ -2,11 +2,11 @@ import { EssentialPropsWithChildren } from '@/types'; import * as S from './styles'; -interface ReviewWritingCardProps { +interface ReviewCardProps { title: string; } -const ReviewWritingCard = ({ title, children }: EssentialPropsWithChildren) => { +const ReviewCard = ({ title, children }: EssentialPropsWithChildren) => { return ( @@ -17,4 +17,4 @@ const ReviewWritingCard = ({ title, children }: EssentialPropsWithChildren {questionSectionList.map((section) => ( - - + + {section.questions.map((question) => ( @@ -55,14 +53,13 @@ const AnswerListRecheckModal = ({ questionSectionList, answerMap, closeModal }: ))} )} - {{question.questionType === 'TEXT'} && ( - + )} ))} - - + + ))} diff --git a/frontend/src/components/AnswerListRecheckModal/styles.ts b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts similarity index 91% rename from frontend/src/components/AnswerListRecheckModal/styles.ts rename to frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts index d2cd552a8..df0037c1c 100644 --- a/frontend/src/components/AnswerListRecheckModal/styles.ts +++ b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts @@ -18,7 +18,7 @@ export const ContentContainer = styled.div` flex-direction: column; `; -export const ReviewWritingCardWrapper = styled.div` +export const ReviewCardWrapper = styled.div` overflow: hidden; border: 0.2rem solid ${({ theme }) => theme.colors.lightPurple}; border-radius: ${({ theme }) => theme.borderRadius.basic}; @@ -27,3 +27,4 @@ export const ReviewWritingCardWrapper = styled.div` export const TextAnswerWrapper = styled.div` margin-top: 1rem; `; + diff --git a/frontend/src/pages/ReviewWritingCardFromPage/components/CardForm/index.tsx b/frontend/src/pages/ReviewWritingCardFromPage/components/CardForm/index.tsx index f6fb240fa..c5adc954e 100644 --- a/frontend/src/pages/ReviewWritingCardFromPage/components/CardForm/index.tsx +++ b/frontend/src/pages/ReviewWritingCardFromPage/components/CardForm/index.tsx @@ -1,8 +1,8 @@ -import { useEffect, useState } from 'react'; +import { useEffect } from 'react'; import { useNavigate } from 'react-router'; import { useRecoilState, useRecoilValue } from 'recoil'; -import { ConfirmModal, AnswerListRecheckModal } from '@/components'; +import { ConfirmModal } from '@/components'; import { useCurrentCardIndex, useGetDataToWrite, @@ -14,12 +14,10 @@ import { useUpdateDefaultAnswers, } from '@/hooks'; import useModals from '@/hooks/useModals'; +import { AnswerListRecheckModal, ProgressBar, ReviewWritingCard } from '@/pages/ReviewWritingCardFromPage/components'; import { answerMapAtom, answerValidationMapAtom, visitedCardListAtom } from '@/recoil'; import { ReviewWritingFormResult } from '@/types'; -import ProgressBar from '../ProgressBar'; -import ReviewWritingCard from '../ReviewWritingCard'; - import * as S from './styles'; // const PROJECT_IMAGE_SIZE = '5rem'; diff --git a/frontend/src/pages/ReviewWritingCardFromPage/components/index.tsx b/frontend/src/pages/ReviewWritingCardFromPage/components/index.tsx new file mode 100644 index 000000000..819734ed9 --- /dev/null +++ b/frontend/src/pages/ReviewWritingCardFromPage/components/index.tsx @@ -0,0 +1,7 @@ +export { default as AnswerListRecheckModal } from './AnswerListRecheckModal'; +export { default as CardForm } from './CardForm'; +export { default as CardSliderController } from './CardSliderController'; +export { default as MultipleChoiceQuestion } from './MultipleChoiceQuestion'; +export { default as ProgressBar } from './ProgressBar'; +export { default as QnABox } from './QnABox'; +export { default as ReviewWritingCard } from './ReviewWritingCard'; From 37f9dae2ba3ac8655e398b0f0aa6750dc3269c00 Mon Sep 17 00:00:00 2001 From: badahertz52 Date: Tue, 20 Aug 2024 15:54:04 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=EC=A0=9C=EC=B6=9C=20=EC=A0=81=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=20=EB=AA=A8=EB=8B=AC=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=9E=91=EC=84=B1=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=80=20?= =?UTF-8?q?=EB=8B=A8=EB=B3=80=EC=97=90=20=EB=8C=80=ED=95=9C=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/AnswerListRecheckModal/index.tsx | 7 +++++++ .../components/AnswerListRecheckModal/styles.ts | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/index.tsx b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/index.tsx index aef756994..674420459 100644 --- a/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/index.tsx +++ b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/index.tsx @@ -53,6 +53,13 @@ const AnswerListRecheckModal = ({ questionSectionList, answerMap, closeModal }: ))} )} + {question.questionType === 'TEXT' && ( + + {findTextAnswer(question.questionId) ? ( + + ) : ( + 작성한 답변이 없어요 + )} )} diff --git a/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts index df0037c1c..0340c694f 100644 --- a/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts +++ b/frontend/src/pages/ReviewWritingCardFromPage/components/AnswerListRecheckModal/styles.ts @@ -28,3 +28,7 @@ export const TextAnswerWrapper = styled.div` margin-top: 1rem; `; +export const EmptyTextAnswer = styled.p` + width: 100%; + color: ${({ theme }) => theme.colors.gray}; +`; From 6aabd39d2619dbd01c4104d42f468469e2abedd7 Mon Sep 17 00:00:00 2001 From: badahertz52 Date: Tue, 20 Aug 2024 16:02:06 +0900 Subject: [PATCH 3/3] =?UTF-8?q?desing:=20LongReviewItem=EC=9D=98=20font-we?= =?UTF-8?q?ight=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/common/LongReviewItem/styles.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/frontend/src/components/common/LongReviewItem/styles.ts b/frontend/src/components/common/LongReviewItem/styles.ts index d06a800aa..113cfb1e7 100644 --- a/frontend/src/components/common/LongReviewItem/styles.ts +++ b/frontend/src/components/common/LongReviewItem/styles.ts @@ -19,16 +19,11 @@ export const Textarea = styled.textarea` height: 15rem; padding: 1.6rem; - font-weight: ${({ theme }) => theme.fontWeight.medium}; overflow-wrap: break-word; border: 0.1rem solid ${({ $isError, theme }) => ($isError ? theme.colors.red : theme.colors.black)}; border-radius: 0.8rem; - &::placeholder { - font-weight: ${({ theme }) => theme.fontWeight.medium}; - } - ${({ $style }) => $style && { ...$style }}; `;