File tree Expand file tree Collapse file tree 8 files changed +13
-32
lines changed
src/routes/mission/$missionId Expand file tree Collapse file tree 8 files changed +13
-32
lines changed Original file line number Diff line number Diff line change 11import { useNavigate } from "@tanstack/react-router" ;
22import CloseIcon from "@/components/icons/CloseIcon" ;
3- import MissionMyProfile from "../../-components/MissionMyProfile" ;
43
5- export default function MissionDetailHeader ( {
6- type = "close" ,
7- } : {
8- type ?: "close" | "mypage" ;
9- } ) {
4+ export default function MissionDetailHeader ( ) {
105 const navigate = useNavigate ( ) ;
116
127 return (
138 < header className = "flex items-center justify-end p-2" >
149 < button
1510 type = "button"
1611 onClick = { ( ) => {
17- if ( type === "close" ) {
18- navigate ( { to : "/mission" } ) ;
19- }
20- if ( type === "mypage" ) {
21- navigate ( { to : "/my" } ) ;
22- }
12+ navigate ( { to : "/mission" } ) ;
2313 } }
2414 >
25- { type === "close" && (
26- < div className = "p-2" >
27- < CloseIcon variant = "white" width = { 24 } height = { 24 } />
28- </ div >
29- ) }
30- { type === "mypage" && < MissionMyProfile /> }
15+ < div className = "p-2" >
16+ < CloseIcon variant = "white" width = { 24 } height = { 24 } />
17+ </ div >
3118 </ button >
3219 </ header >
3320 ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default function MissionNotTriedDefault({
1919} : MissionNotTriedDefaultProps ) {
2020 return (
2121 < >
22- < MissionDetailHeader type = "close" />
22+ < MissionDetailHeader />
2323
2424 < div className = "flex-1 flex flex-col items-center gap-4 px-4" >
2525 < div className = "flex flex-col items-center gap-2" >
Original file line number Diff line number Diff line change 1- import { useNavigate } from "@tanstack/react-router" ;
21import Button from "@/components/Button" ;
32import MissionDetailHeader from "./MissionDetailHeader" ;
43
@@ -11,11 +10,9 @@ export default function MissionNotTriedFailed({
1110 videoUrl,
1211 onRetry,
1312} : MissionNotTriedFailedProps ) {
14- const navigate = useNavigate ( ) ;
15-
1613 return (
1714 < >
18- < MissionDetailHeader type = "mypage" />
15+ < MissionDetailHeader />
1916
2017 < div className = "flex-1 flex flex-col items-center" >
2118 < div className = "w-full flex flex-col items-center gap-4 mb-6 px-4" >
@@ -41,7 +38,6 @@ export default function MissionNotTriedFailed({
4138 </ div >
4239
4340 < div className = "flex justify-center gap-2 px-[30px] pb-6" >
44- < Button onClick = { ( ) => navigate ( { to : "/mission" } ) } > 홈</ Button >
4541 < Button onClick = { onRetry } > 재도전</ Button >
4642 </ div >
4743 </ >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default function MissionNotTriedReviewing({
1616} : MissionNotTriedReviewingProps ) {
1717 return (
1818 < >
19- < MissionDetailHeader type = "mypage" />
19+ < MissionDetailHeader />
2020
2121 < div className = "flex-1 flex flex-col items-center" >
2222 < div className = "w-full flex flex-col items-center gap-1 mb-4 px-4" >
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default function MissionNotTriedSuccess({
3030
3131 return (
3232 < >
33- < MissionDetailHeader type = "close" />
33+ < MissionDetailHeader />
3434
3535 < div className = "flex-1 flex flex-col items-center" >
3636 < div className = "w-full flex flex-col items-center gap-4 mb-6 px-4" >
Original file line number Diff line number Diff line change @@ -56,8 +56,6 @@ export default function MissionResultView({
5656 ) ;
5757 const latestAttemptUrl = missionData ?. attempts ?. [ 0 ] ?. videoUrl ;
5858
59- console . log ( selectedIndex ) ;
60-
6159 const handleDownload = async ( url : string | undefined , filename : string ) => {
6260 if ( ! url ) return ;
6361
@@ -120,7 +118,7 @@ export default function MissionResultView({
120118 </ div >
121119 </ div >
122120
123- < div className = "flex items-center gap-4 pt-6 " >
121+ < div className = "flex items-center gap-4 pt-4 " >
124122 < div className = "overflow-hidden w-full" ref = { emblaRef } >
125123 < div className = "flex items-center" >
126124 < VideoComponent
@@ -135,7 +133,7 @@ export default function MissionResultView({
135133 </ div >
136134 </ div >
137135
138- < div className = "flex justify-center gap-4 px-4 py -6 pb-24 " >
136+ < div className = "flex justify-center gap-4 px-4 pb -6 mt-auto " >
139137 { latestAttemptUrl && (
140138 < Button
141139 onClick = { ( ) =>
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ function MissionFailed() {
4646
4747 return (
4848 < div className = "fixed inset-0 flex flex-col h-full bg-neutral-900" >
49- < MissionDetailHeader type = "close" />
49+ < MissionDetailHeader />
5050 < MissionResultView
5151 status = "failed"
5252 missionData = { currentMission }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ function MissionSuccess() {
4444
4545 return (
4646 < div className = "fixed inset-0 flex flex-col h-full bg-neutral-900" >
47- < MissionDetailHeader type = "close" />
47+ < MissionDetailHeader />
4848 < MissionResultView status = "success" missionData = { currentMission } />
4949 </ div >
5050 ) ;
You can’t perform that action at this time.
0 commit comments