From 88ec4e71345fd7f83b3744e14f8a82e4a4f49b19 Mon Sep 17 00:00:00 2001 From: SeieunYoo <101736358+SeieunYoo@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:38:10 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20=EA=B3=BC=EC=A0=9C=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20EmptyStudy=20=EC=B2=98=EB=A6=AC,=20=EC=A0=9C?= =?UTF-8?q?=EC=B6=9C=20=EC=8B=A4=ED=8C=A8=20=EC=96=B8=EB=85=B8=EC=9A=B4=20?= =?UTF-8?q?=EC=9D=BC=20=EB=95=8C=20UI=20=EC=88=98=EC=A0=95=20(#144)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: studyid 가 없을 떄 emptystudy 컴포넌트 렌더링 * chore: 수정된 디자인 반영 * fix: 디자인 수정 반영 * chore: 버튼 whitespce nowrap 추가 --- .../AssignmentBoxInfo.tsx | 2 +- .../AssignmentOverviewBox/FailurePopover.tsx | 11 ++--- .../_components/AssignmentContent/index.tsx | 4 +- .../AssignmentHistoryItem.tsx | 41 +++++++++++-------- .../my-study/my-assignment/page.tsx | 9 +++- 5 files changed, 38 insertions(+), 29 deletions(-) diff --git a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/AssignmentBoxInfo.tsx b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/AssignmentBoxInfo.tsx index 451b4f6d..1807e8fa 100644 --- a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/AssignmentBoxInfo.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/AssignmentBoxInfo.tsx @@ -55,5 +55,5 @@ const failMapping: Record = { WORD_COUNT_INSUFFICIENT: "글자수 부족", NOT_SUBMITTED: "제출 안함", NONE: "없음", - UNKNOWN: "알 수 없음", + UNKNOWN: "제출 실패", }; diff --git a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/FailurePopover.tsx b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/FailurePopover.tsx index c662f56d..deb69343 100644 --- a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/FailurePopover.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/AssignmentOverviewBox/FailurePopover.tsx @@ -25,8 +25,7 @@ export const FailurePopover = ({ "Q. 글자수가 부족하다고 나와요."} {submissionFailureType === "LOCATION_UNIDENTIFIABLE" && 'Q. "위치 확인 불가" 라고 나와요.'} - {submissionFailureType === "UNKNOWN" && - 'Q. "알 수 없음" 라고 나와요.'} + {submissionFailureType === "UNKNOWN" && 'Q. "제출 실패" 라고 나와요.'} {submissionFailureType === "LOCATION_UNIDENTIFIABLE" && ( @@ -56,13 +55,11 @@ export const FailurePopover = ({ )} {submissionFailureType === "UNKNOWN" && (

- '위치 확인 불가' 나 '글자 수 부족' 외의 다른 이유로 + 제출이 실패한 이유를 파악할 수 없어요.

- 제출 실패를 한 경우에요.
+ 이름, 학번과 함께 어떤 상황인지
- 제대로 제출한 후에도 계속 '알 수 없음' 이 뜬다면, -
- GDSC Hongik 카카오톡 채널로 문의해주세요. + GDSC Hongik 카카오톡 채널로 전달해주세요.

)}
diff --git a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/index.tsx b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/index.tsx index eeb5ad61..c8d8eecf 100644 --- a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/index.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentContent/index.tsx @@ -3,8 +3,6 @@ import { Flex } from "@styled-system/jsx"; import { Space } from "@wow-class/ui"; import { myStudyApi } from "apis/myStudyApi"; import { studyDetailApi } from "apis/studyDetailApi"; -import { routePath } from "constants/routePath"; -import { redirect } from "next/navigation"; import { AssignmentOverviewBox } from "./AssignmentOverviewBox"; import { EmptyAssignmentBox } from "./EmptyAssignmentBox"; @@ -14,7 +12,7 @@ export const AssignmentContent = async () => { const myOngoingStudyInfoData = await myStudyApi.getMyOngoingStudyInfo(); if (!myOngoingStudyInfoData?.studyId) { - return redirect(routePath["my-study"]); + return; } const studyDashboard = await studyDetailApi.getStudyDetailDashboard( myOngoingStudyInfoData.studyId diff --git a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentHistory/AssignmentHistoryItem.tsx b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentHistory/AssignmentHistoryItem.tsx index 07563ec4..2afccd42 100644 --- a/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentHistory/AssignmentHistoryItem.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-assignment/_components/AssignmentHistory/AssignmentHistoryItem.tsx @@ -58,11 +58,14 @@ export const AssignmentHistoryItem = ({ - + {descriptionLink ? ( - - - + ) : ( "-" )} @@ -78,11 +81,15 @@ export const AssignmentHistoryItem = ({ {submissionLink ? ( - - - + ) : ( "-" )} @@ -119,6 +126,13 @@ const titleStyle = css({ }, }); const buttonContainerStyle = css({ + justifyContent: "center", + textStyle: "body1", + minWidth: "182px", + whiteSpace: "nowrap", +}); + +const textButtonContainerStyle = css({ justifyContent: "center", textStyle: "body1", minWidth: "163px", @@ -129,7 +143,7 @@ const buttonContainerStyle = css({ minWidth: "133px", }, "@media (max-width: 960px)": { - display: "none", + display: "none !important", }, }); @@ -144,11 +158,6 @@ const tagContainerStyle = css({ }, }); -const textButtonStyle = css({ - "@media (max-width: 960px)": { - display: "none", - }, -}); const assignmentSubmissionMap: Record< "CANCELLED" | "FAILURE" | "SUCCESS", { tagText: string; tagColor: ComponentProps["color"] } @@ -162,5 +171,5 @@ const failMapping: Record = { WORD_COUNT_INSUFFICIENT: "글자수부족", NOT_SUBMITTED: "미제출", NONE: "", - UNKNOWN: "알수없음", + UNKNOWN: "제출실패", }; diff --git a/apps/client/app/(afterLogin)/my-study/my-assignment/page.tsx b/apps/client/app/(afterLogin)/my-study/my-assignment/page.tsx index 9076f4ca..18b846e0 100644 --- a/apps/client/app/(afterLogin)/my-study/my-assignment/page.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-assignment/page.tsx @@ -1,12 +1,15 @@ import { Space } from "@wow-class/ui"; +import { myStudyApi } from "apis/myStudyApi"; +import { EmptyStudy } from "../_components"; import { AssignmentHistory } from "./_components"; import { AssignmentContent } from "./_components/AssignmentContent"; import { AssignmentDescription } from "./_components/AssignmentDescription"; import { AssignmentHeader } from "./_components/AssignmentHeader"; -const MyAssignmentPage = () => { - return ( +const MyAssignmentPage = async () => { + const myOngoingStudyInfoData = await myStudyApi.getMyOngoingStudyInfo(); + return myOngoingStudyInfoData?.studyId ? ( <> @@ -15,6 +18,8 @@ const MyAssignmentPage = () => { + ) : ( + ); };