Skip to content

Commit 82637f3

Browse files
committed
fix: 디자인 QA 수정, 추천 문제 이동 기능 수정, 프로필 아이콘 추가 등
1 parent 2becad1 commit 82637f3

File tree

10 files changed

+164
-144
lines changed

10 files changed

+164
-144
lines changed

src/routes/mission/$missionId/-components/MissionDetailHeader.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useNavigate } from "@tanstack/react-router";
22
import CloseIcon from "@/components/icons/CloseIcon";
3+
import MissionMyProfile from "../../-components/MissionMyProfile";
34

45
export default function MissionDetailHeader({
56
type = "close",
@@ -9,7 +10,7 @@ export default function MissionDetailHeader({
910
const navigate = useNavigate();
1011

1112
return (
12-
<header className="flex items-center justify-end pt-4">
13+
<header className="flex items-center justify-end p-4">
1314
<button
1415
type="button"
1516
onClick={() => {
@@ -20,14 +21,13 @@ export default function MissionDetailHeader({
2021
navigate({ to: "/mypage" });
2122
}
2223
}}
23-
className="p-2"
2424
>
2525
{type === "close" && (
26-
<CloseIcon variant="white" width={24} height={24} />
27-
)}
28-
{type === "mypage" && (
29-
<div className="w-[42px] h-[42px] bg-neutral-100 rounded-full" />
26+
<div className="p-2">
27+
<CloseIcon variant="white" width={24} height={24} />
28+
</div>
3029
)}
30+
{type === "mypage" && <MissionMyProfile />}
3131
</button>
3232
</header>
3333
);

src/routes/mission/$missionId/-components/MissionNotTried.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default function MissionNotTried(props: MissionNotTriedProps) {
124124

125125
return (
126126
<div
127-
className={`fixed inset-0 flex flex-col ${state === "REVIEWING" ? "bg-neutral-500" : "bg-neutral-900"}`}
127+
className={`fixed inset-0 flex flex-col ${state === "REVIEWING" || state === "FAILED" ? "bg-neutral-500" : "bg-neutral-800"}`}
128128
>
129129
<input
130130
ref={fileInputRef}
@@ -156,7 +156,12 @@ export default function MissionNotTried(props: MissionNotTriedProps) {
156156
/>
157157
);
158158
case "SUCCESS":
159-
return <MissionNotTriedSuccess attemptId={successAttemptId} />;
159+
return (
160+
<MissionNotTriedSuccess
161+
attemptId={successAttemptId}
162+
onStart={() => setState("DEFAULT")}
163+
/>
164+
);
160165
case "FAILED":
161166
return (
162167
<MissionNotTriedFailed

src/routes/mission/$missionId/-components/MissionNotTriedDefault.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function MissionNotTriedDefault({
1818
onStart,
1919
}: MissionNotTriedDefaultProps) {
2020
return (
21-
<div className="fixed inset-0 flex flex-col bg-neutral-900">
21+
<>
2222
<MissionDetailHeader type="close" />
2323

2424
<div className="flex-1 flex flex-col items-center gap-4 px-4">
@@ -47,9 +47,10 @@ export default function MissionNotTriedDefault({
4747
imageUrl={missionImage}
4848
status="not_tried"
4949
onStart={onStart}
50+
type="detail"
5051
/>
5152
</div>
5253
</div>
53-
</div>
54+
</>
5455
);
5556
}

src/routes/mission/$missionId/-components/MissionNotTriedFailed.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function MissionNotTriedFailed({
1414
const navigate = useNavigate();
1515

1616
return (
17-
<div className="flex-1 flex flex-col bg-neutral-500">
17+
<>
1818
<MissionDetailHeader type="mypage" />
1919

2020
<div className="flex-1 flex flex-col items-center">
@@ -43,6 +43,6 @@ export default function MissionNotTriedFailed({
4343
<Button onClick={() => navigate({ to: "/mission" })}></Button>
4444
<Button onClick={onRetry}>재도전</Button>
4545
</div>
46-
</div>
46+
</>
4747
);
4848
}

src/routes/mission/$missionId/-components/MissionNotTriedReviewing.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function MissionNotTriedReviewing({
1515
onRetry,
1616
}: MissionNotTriedReviewingProps) {
1717
return (
18-
<div className="flex-1 flex flex-col">
18+
<>
1919
<MissionDetailHeader type="mypage" />
2020

2121
<div className="flex-1 flex flex-col items-center">
@@ -45,6 +45,6 @@ export default function MissionNotTriedReviewing({
4545
<Button onClick={onRetry}>재촬영</Button>
4646
<Button onClick={onSuccess}>성공</Button>
4747
</div>
48-
</div>
48+
</>
4949
);
5050
}

src/routes/mission/$missionId/-components/MissionNotTriedSuccess.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ import MissionDetailHeader from "./MissionDetailHeader";
99

1010
interface MissionNotTriedSuccessProps {
1111
attemptId: number | null;
12+
onStart: () => void;
1213
}
1314

1415
export default function MissionNotTriedSuccess({
1516
attemptId,
17+
onStart,
1618
}: MissionNotTriedSuccessProps) {
1719
const navigate = useNavigate();
1820
const { emblaRef, selectedIndex } = useCarousel();
@@ -27,7 +29,7 @@ export default function MissionNotTriedSuccess({
2729
});
2830

2931
return (
30-
<div className="flex-1 flex flex-col">
32+
<>
3133
<MissionDetailHeader type="close" />
3234

3335
<div className="flex-1 flex flex-col items-center">
@@ -61,7 +63,9 @@ export default function MissionNotTriedSuccess({
6163
to: "/mission/$missionId",
6264
params: { missionId: mission.missionId?.toString() },
6365
});
66+
onStart();
6467
}}
68+
type="recommendation"
6569
/>
6670
</div>
6771
))}
@@ -74,6 +78,6 @@ export default function MissionNotTriedSuccess({
7478
<span className="text-neutral-400">{missions?.length}</span>
7579
</div>
7680
</div>
77-
</div>
81+
</>
7882
);
7983
}

src/routes/mission/$missionId/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function MissionDetail() {
4242
}
4343

4444
return (
45-
<div className="fixed inset-0 flex flex-col bg-neutral-900">
45+
<div className="fixed inset-0 flex flex-col">
4646
<MissionNotTried
4747
missionId={Number(missionId)}
4848
sectorName={currentMission.sector?.name ?? ""}

0 commit comments

Comments
 (0)