From f9816dc8414c106e3fb235af0e1925f7d91a77b3 Mon Sep 17 00:00:00 2001 From: andyye <63383967+0ev@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:08:09 +0900 Subject: [PATCH 1/7] Fix: many problems: --- .env.example | 5 ----- .../web/src/pages/Event/Event2024Spring.tsx | 13 ++++++++++--- packages/web/src/pages/Home/index.tsx | 18 ++++++++++++------ 3 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index a4a2238aa..000000000 --- a/.env.example +++ /dev/null @@ -1,5 +0,0 @@ -REACT_APP_BACK_URL=[back url(e.g. http://localhost:80)] -REACT_APP_IO_URL=[Socket.io server url(e.g. http://localhost:80)] # 주어지지 않은 경우 REACT_APP_BACK_URL로 설정됩니다. -REACT_APP_S3_URL=[aws s3 baseline url] -REACT_APP_GA_TRACKING_ID=[google analytics tracking id] -REACT_APP_FIREBASE_CONFIG=[firebase config JSON] diff --git a/packages/web/src/pages/Event/Event2024Spring.tsx b/packages/web/src/pages/Event/Event2024Spring.tsx index b5c25439c..b083ddd30 100644 --- a/packages/web/src/pages/Event/Event2024Spring.tsx +++ b/packages/web/src/pages/Event/Event2024Spring.tsx @@ -368,8 +368,8 @@ const Event2024Spring = () => { width: "100%", }} > - - + + { - + { const isOpenEventJoin = inviterId ? true : _roomId == "startEvent"; const onChangeIsOpenPrivacyPolicy = () => history.replace("/home"); const onChangeIsOpenEventJoin = () => history.replace("/home"); + const isLogin = useIsLogin(); + console.log(isLogin); const roomId = _roomId === "privacyPolicy" ? null : isOpenEventJoin ? null : _roomId; @@ -47,18 +51,20 @@ const Home = () => { <> - + {isLogin && } - + {isLogin && ( + + )} > ); }; From bf906f8952ef469b8a170ade95aec7179f75ea31 Mon Sep 17 00:00:00 2001 From: andyye <63383967+0ev@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:18:52 +0900 Subject: [PATCH 2/7] Fix: problems --- .env.example | 5 ++ .../EventSection/EventSection2024Spring.tsx | 81 ++++++++++--------- packages/web/src/pages/Home/index.tsx | 1 - 3 files changed, 47 insertions(+), 40 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..60483b768 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +REACT_APP_BACK_URL=[back url(e.g. http://localhost:80)] +REACT_APP_IO_URL=[Socket.io server url(e.g. http://localhost:80)] # 주어지지 않은 경우 REACT_APP_BACK_URL로 설정됩니다. +REACT_APP_S3_URL=[aws s3 baseline url] +REACT_APP_GA_TRACKING_ID=[google analytics tracking id] +REACT_APP_FIREBASE_CONFIG=[firebase config JSON] \ No newline at end of file diff --git a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx index 42dcbf107..7627e01bb 100644 --- a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx +++ b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx @@ -21,7 +21,8 @@ const EventSection2024Spring = () => { background: eventTheme.black, }; - const { isEligible } = useValueRecoilState("event2024SpringInfo") || {}; + const { isEligible, isAgreeOnTermsOfEvent } = + useValueRecoilState("event2024SpringInfo") || {}; return ( <> @@ -68,45 +69,47 @@ const EventSection2024Spring = () => { {getDday("2024-03-18")} - - - - - - - - - - - - + {isAgreeOnTermsOfEvent && ( + + + + + + + + + + + + + - + )} diff --git a/packages/web/src/pages/Home/index.tsx b/packages/web/src/pages/Home/index.tsx index 879028e9f..8331a1c3f 100644 --- a/packages/web/src/pages/Home/index.tsx +++ b/packages/web/src/pages/Home/index.tsx @@ -32,7 +32,6 @@ const Home = () => { const onChangeIsOpenPrivacyPolicy = () => history.replace("/home"); const onChangeIsOpenEventJoin = () => history.replace("/home"); const isLogin = useIsLogin(); - console.log(isLogin); const roomId = _roomId === "privacyPolicy" ? null : isOpenEventJoin ? null : _roomId; From 7a2ce308eda4906a1b8451478432ae3b5e025454 Mon Sep 17 00:00:00 2001 From: andyye <63383967+0ev@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:20:31 +0900 Subject: [PATCH 3/7] Fix:final --- packages/web/src/pages/Home/index.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/web/src/pages/Home/index.tsx b/packages/web/src/pages/Home/index.tsx index 8331a1c3f..caa3383ac 100644 --- a/packages/web/src/pages/Home/index.tsx +++ b/packages/web/src/pages/Home/index.tsx @@ -31,7 +31,6 @@ const Home = () => { const isOpenEventJoin = inviterId ? true : _roomId == "startEvent"; const onChangeIsOpenPrivacyPolicy = () => history.replace("/home"); const onChangeIsOpenEventJoin = () => history.replace("/home"); - const isLogin = useIsLogin(); const roomId = _roomId === "privacyPolicy" ? null : isOpenEventJoin ? null : _roomId; @@ -50,20 +49,18 @@ const Home = () => { <> - {isLogin && } + - {isLogin && ( - - )} + > ); }; From 1d54f5ae876d26296889329eee82327409cad6ef Mon Sep 17 00:00:00 2001 From: andyye <63383967+0ev@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:25:39 +0900 Subject: [PATCH 4/7] Remove: import: --- packages/web/src/pages/Home/index.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/web/src/pages/Home/index.tsx b/packages/web/src/pages/Home/index.tsx index caa3383ac..d71b90921 100644 --- a/packages/web/src/pages/Home/index.tsx +++ b/packages/web/src/pages/Home/index.tsx @@ -1,8 +1,6 @@ import { useEffect } from "react"; import { useHistory, useParams } from "react-router-dom"; -import { useIsLogin } from "@/hooks/useFetchRecoilState"; - import Footer from "@/components/Footer"; import { ModalEvent2024SpringJoin, From c99a3bc26f6f07bc0c7e8569f729b0523b2a815e Mon Sep 17 00:00:00 2001 From: static Date: Wed, 6 Mar 2024 00:34:28 +0900 Subject: [PATCH 5/7] Refactor: restore .env.example --- .env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 60483b768..a4a2238aa 100644 --- a/.env.example +++ b/.env.example @@ -2,4 +2,4 @@ REACT_APP_BACK_URL=[back url(e.g. http://localhost:80)] REACT_APP_IO_URL=[Socket.io server url(e.g. http://localhost:80)] # 주어지지 않은 경우 REACT_APP_BACK_URL로 설정됩니다. REACT_APP_S3_URL=[aws s3 baseline url] REACT_APP_GA_TRACKING_ID=[google analytics tracking id] -REACT_APP_FIREBASE_CONFIG=[firebase config JSON] \ No newline at end of file +REACT_APP_FIREBASE_CONFIG=[firebase config JSON] From e7bdb6a7de54a7ede9ffa20d4672565128bf7cbf Mon Sep 17 00:00:00 2001 From: static Date: Wed, 6 Mar 2024 17:01:25 +0900 Subject: [PATCH 6/7] Fix: some buttons don't appear when the user doesn't participate in the event --- .../EventSection/EventSection2024Spring.tsx | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx index 7627e01bb..fdb39a173 100644 --- a/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx +++ b/packages/web/src/pages/Home/EventSection/EventSection2024Spring.tsx @@ -69,47 +69,45 @@ const EventSection2024Spring = () => { {getDday("2024-03-18")} - {isAgreeOnTermsOfEvent && ( - - - - - - - - - - - - - + + {isAgreeOnTermsOfEvent && } + + + + + + + + + + - )} + From fa20ae075685f9f396f9195302c8102299bda655 Mon Sep 17 00:00:00 2001 From: static Date: Wed, 6 Mar 2024 17:05:34 +0900 Subject: [PATCH 7/7] Fix: CreditAmountContainer appears in the mission page when the user doesn't participate in the event --- packages/web/src/pages/Event/Event2024SpringMissions.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/web/src/pages/Event/Event2024SpringMissions.tsx b/packages/web/src/pages/Event/Event2024SpringMissions.tsx index 6eae3b8eb..b5e051905 100644 --- a/packages/web/src/pages/Event/Event2024SpringMissions.tsx +++ b/packages/web/src/pages/Event/Event2024SpringMissions.tsx @@ -151,7 +151,8 @@ export const MissionContainer = ({ quest }: MissionContainerProps) => { }; const Event2024SpringMissions = () => { - const { quests } = useValueRecoilState("event2024SpringInfo") || {}; + const { isAgreeOnTermsOfEvent, quests } = + useValueRecoilState("event2024SpringInfo") || {}; useEventBackgroundEffect(); return ( @@ -161,7 +162,7 @@ const Event2024SpringMissions = () => { - + {isAgreeOnTermsOfEvent && } {quests?.map((quest) => (