From 96654d6d3a10ddb79ebac1ae5b52aad11caf5eb1 Mon Sep 17 00:00:00 2001 From: pbc1017 Date: Wed, 21 Feb 2024 04:52:52 +0900 Subject: [PATCH 1/3] Refactor: show event section by isEligible value --- packages/web/src/atoms/event2024SpringInfo.ts | 1 + .../EventSection/EventSection2024Spring.tsx | 178 +++++++++--------- 2 files changed, 94 insertions(+), 85 deletions(-) diff --git a/packages/web/src/atoms/event2024SpringInfo.ts b/packages/web/src/atoms/event2024SpringInfo.ts index 7c50895ce..5c263fdbc 100644 --- a/packages/web/src/atoms/event2024SpringInfo.ts +++ b/packages/web/src/atoms/event2024SpringInfo.ts @@ -4,6 +4,7 @@ import { atom } from "recoil"; export type Event2024SpringInfoType = Nullable<{ isAgreeOnTermsOfEvent: boolean; + isEligible: boolean; completedQuests: QuestId[]; creditAmount: number; groupCreditAmount: number; diff --git a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx index d4840a4c0..ab4182829 100644 --- a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx +++ b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx @@ -1,5 +1,7 @@ import { Link } from "react-router-dom"; +import { useValueRecoilState } from "@/hooks/useFetchRecoilState"; + import AdaptiveDiv from "@/components/AdaptiveDiv"; import CreditAmountContainer from "@/components/Event/CreditAmoutContainer"; import EventButton from "@/components/Event/EventButton"; @@ -18,58 +20,62 @@ const EventSection2024Spring = () => { background: eventTheme.black, }; + const { isEligible } = useValueRecoilState("event2024SpringInfo") || {}; + return ( -
- -
- - - - - - - -
- 새터반 택시대제전 -
-
- D-001 -
-
-
- {/*
+ {isEligible ? ( +
+ +
+ + + + + + + +
+ 새터반 택시대제전 +
+
+ D-001 +
+
+
+ {/*
{ }} > 새터 00반 넙죽코인 */} - - {/*
*/} -
- - - - - - - - - -
+ + {/*
*/} +
+ + + + + + + + + +
+
+ +
- - -
+ ) : null} + ); }; From addd06baf85721b29b6bcc93445d5bafa683815d Mon Sep 17 00:00:00 2001 From: ybmin Date: Wed, 21 Feb 2024 18:34:50 +0900 Subject: [PATCH 2/3] Fix: change order of credit --- packages/web/src/components/ModalPopup/ModalCredit.tsx | 10 +++++----- packages/web/src/pages/Mypage/langs/en.json | 4 ++-- packages/web/src/pages/Mypage/langs/ko.json | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/web/src/components/ModalPopup/ModalCredit.tsx b/packages/web/src/components/ModalPopup/ModalCredit.tsx index 35b171887..7c9696a05 100644 --- a/packages/web/src/components/ModalPopup/ModalCredit.tsx +++ b/packages/web/src/components/ModalPopup/ModalCredit.tsx @@ -129,6 +129,11 @@ const ModalCredit = ({ name: t("page_credit.category_all"), body: , }, + { + key: "2024SpringEvent", + name: t("page_credit.category_2024spring_event"), + body: , + }, { key: "2023FallEvent", name: t("page_credit.category_2023fall_event"), @@ -139,11 +144,6 @@ const ModalCredit = ({ name: t("page_credit.category_2023spring_event"), body: , }, - { - key: "2024SpringEvent", - name: t("page_credit.category_2024spring_event"), - body: , - }, ], [t] ); diff --git a/packages/web/src/pages/Mypage/langs/en.json b/packages/web/src/pages/Mypage/langs/en.json index 445a292cb..365791c93 100644 --- a/packages/web/src/pages/Mypage/langs/en.json +++ b/packages/web/src/pages/Mypage/langs/en.json @@ -29,9 +29,9 @@ }, "page_credit": { "category_all": "All", + "category_2024spring_event": "2024 Spring Freshman Class Taxi Event", "category_2023fall_event": "2023 Fall Thanksgiving Event", - "category_2023spring_event": "2023 Spring Taxi Ride Verification Event", - "category_2024spring_event": "2024 Spring Freshman Class Taxi Event" + "category_2023spring_event": "2023 Spring Taxi Ride Verification Event" }, "page_report": { "inquiry": "If you have inquiries about the report details, please use the 'Contact us' menu.", diff --git a/packages/web/src/pages/Mypage/langs/ko.json b/packages/web/src/pages/Mypage/langs/ko.json index 4ff91e1a5..99afcaebe 100644 --- a/packages/web/src/pages/Mypage/langs/ko.json +++ b/packages/web/src/pages/Mypage/langs/ko.json @@ -29,10 +29,9 @@ }, "page_credit": { "category_all": "전체", - "category_2024spring_event": "2024 봄학기 새터반 택시 대제전 이벤트", + "category_2024spring_event": "2024 봄학기 새터반 택시대제전 이벤트", "category_2023fall_event": "2023 가을학기 한가위 송편 이벤트", - "category_2023spring_event": "2023 봄학기 택시 탑승 인증 이벤트", - "category_2024spring_event": "2024 봄학기 새터반 택시대제전" + "category_2023spring_event": "2023 봄학기 택시 탑승 인증 이벤트" }, "page_report": { "inquiry": "아래 신고 내역에 대해 문의하고 싶으신 경우 “채널톡 문의하기” 메뉴를 이용해주세요.", From f4e3ccbf722c649fc74b7084433de011847725cf Mon Sep 17 00:00:00 2001 From: static Date: Fri, 23 Feb 2024 01:53:57 +0900 Subject: [PATCH 3/3] Remove: unnecessary comments in EventSection2024Spring.tsx --- .../Home/EventSection/EventSection2024Spring.tsx | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx index ab4182829..acf3dd7d9 100644 --- a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx +++ b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx @@ -75,21 +75,7 @@ const EventSection2024Spring = () => { paddingBottom: "15px", }} > - {/*
- 새터 00반 넙죽코인 */} - {/*
*/}