File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed
routes/mission/-components Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 11export const MISSION_GUIDE_COMPLETED_KEY = "MISSION_GUIDE_COMPLETED" ;
2+
3+ export const MISSION_STATUS_MESSAGES = {
4+ success : [
5+ "방금 그 루트 멋지게 완등했어요!" ,
6+ "이 정도면 다음 루트도 충분해요" ,
7+ "깔끔하게 올라왔네요" ,
8+ "조금씩 성장하고 있어요" ,
9+ "방금 루트 좋았어요!" ,
10+ ] ,
11+ failed : [
12+ "시도 자체가 멋져요" ,
13+ "다음엔 더 잘할 수 있어요" ,
14+ "아쉽지만 괜찮아요" ,
15+ "다음 도전도 기대돼요" ,
16+ "이 정도면 절반은 성공!" ,
17+ ] ,
18+ not_tried : [
19+ "이 루트가 궁금하지 않으신가요?" ,
20+ "내 레벨에 맞는 추천 루트에요" ,
21+ "내 실력 상승에 좋은 루트에요" ,
22+ ] ,
23+ } as const ;
Original file line number Diff line number Diff line change 11import { Link } from "@tanstack/react-router" ;
2+ import { sample } from "es-toolkit/compat" ;
23import { Tooltip } from "radix-ui" ;
34import Button from "@/components/Button" ;
45import { Tag } from "@/components/tag/Tag" ;
6+ import { MISSION_STATUS_MESSAGES } from "@/constants/mission" ;
57import { cn } from "@/utils/cn" ;
68import { convertPascalCase } from "@/utils/convert" ;
79import { getDiffFromNow } from "@/utils/date" ;
@@ -141,7 +143,7 @@ export default function MissionGridCard({
141143 < div className = "flex items-center gap-1" >
142144 { status === "not_tried" ? (
143145 < div className = "t-p-14-m text-neutral-100" >
144- 이 루트 궁금하지 않으신가요?
146+ { sample ( MISSION_STATUS_MESSAGES . not_tried ) }
145147 </ div >
146148 ) : (
147149 < >
@@ -152,8 +154,8 @@ export default function MissionGridCard({
152154 ) }
153155 < div className = "t-p-14-m" >
154156 { status === "success"
155- ? "완등 ! 대단히 상당히 멋져요!"
156- : "한 번 더 도전해보세요!" }
157+ ? sample ( MISSION_STATUS_MESSAGES . success )
158+ : sample ( MISSION_STATUS_MESSAGES . failed ) }
157159 </ div >
158160 </ >
159161 ) }
Original file line number Diff line number Diff line change 11import { Link } from "@tanstack/react-router" ;
2+ import { sample } from "es-toolkit/compat" ;
3+ import { MISSION_STATUS_MESSAGES } from "@/constants/mission" ;
24import { cn } from "@/utils/cn" ;
35import { convertPascalCase } from "@/utils/convert" ;
46
@@ -90,9 +92,9 @@ export default function MissionListCard({
9092 { convertPascalCase ( difficulty ) }
9193 </ div >
9294 < div className = "t-p-12-m text-neutral-600 mb-1" >
93- { status === "not_tried" && "이 루트가 궁금하지 않으신가요?" }
94- { status === "success" && "완등 ! 대단히 상당히 멋져요!" }
95- { status === "failed" && "한 번 더 도전해보세요!" }
95+ { status === "not_tried" && sample ( MISSION_STATUS_MESSAGES . not_tried ) }
96+ { status === "success" && sample ( MISSION_STATUS_MESSAGES . success ) }
97+ { status === "failed" && sample ( MISSION_STATUS_MESSAGES . failed ) }
9698 </ div >
9799 < div className = "flex items-center gap-1 t-p-10-sb text-neutral-400" >
98100 < span className = "w-1 h-1 rounded-full bg-neutral-400" />
You can’t perform that action at this time.
0 commit comments