From 7e4db4b1a3235a084338c210a71fdfc199005efc Mon Sep 17 00:00:00 2001 From: 14Kgun Date: Fri, 22 Sep 2023 10:39:37 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Add:=20=EA=B4=91=EA=B3=A0=EC=84=B1=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20in=20ModalNotification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ModalPopup/ModalNotification.tsx | 10 ++++++++++ src/tools/trans.js | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/ModalPopup/ModalNotification.tsx b/src/components/ModalPopup/ModalNotification.tsx index dead3f072..172ad28bb 100644 --- a/src/components/ModalPopup/ModalNotification.tsx +++ b/src/components/ModalPopup/ModalNotification.tsx @@ -133,6 +133,7 @@ const ModalNotification = ({ beforeDepart: value, chatting: value, notice: value, + advertisement: value, }, }, }); @@ -153,6 +154,10 @@ const ModalNotification = ({ onChangeNotificationOption("notice"), [onChangeNotificationOption] ); + const onChangeNotificationAdvertisement = useCallback( + onChangeNotificationOption("advertisement"), + [onChangeNotificationOption] + ); return ( + ) : ( diff --git a/src/tools/trans.js b/src/tools/trans.js index 90701ea00..44a02f148 100644 --- a/src/tools/trans.js +++ b/src/tools/trans.js @@ -23,9 +23,10 @@ const getLocationName = (location, langPreference) => { const isNotificationOn = (notificationOptions) => { const isOn = - // notificationOptions?.advertisement || // notificationOptions?.beforeDepart || - notificationOptions?.chatting || notificationOptions?.notice; + notificationOptions?.advertisement || + notificationOptions?.chatting || + notificationOptions?.notice; // notificationOptions?.keywords?.length; return !!isOn; }; From 176d35a781c2c2ff74415879b37b5e5172420876 Mon Sep 17 00:00:00 2001 From: 14Kgun Date: Fri, 22 Sep 2023 10:51:53 +0900 Subject: [PATCH 2/4] Add: event2023FallQuestComplete("adPushAgreement") --- src/components/ModalPopup/ModalMypageModify.tsx | 4 ++++ src/components/ModalPopup/ModalNotification.tsx | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/components/ModalPopup/ModalMypageModify.tsx b/src/components/ModalPopup/ModalMypageModify.tsx index 3aef64390..ff5465253 100644 --- a/src/components/ModalPopup/ModalMypageModify.tsx +++ b/src/components/ModalPopup/ModalMypageModify.tsx @@ -178,7 +178,9 @@ const ModalMypageModify = ({ method: "post", data: { nickname }, onError: () => setAlert(t("page_modify.nickname_failed")), + //#region event2023Fall onSuccess: () => event2023FallQuestComplete("nicknameChanging"), // event2023Fall + //#endregion }); } if (account !== loginInfo?.account) { @@ -188,7 +190,9 @@ const ModalMypageModify = ({ method: "post", data: { account }, onError: () => setAlert(t("page_modify.account_failed")), + //#region event2023Fall onSuccess: () => event2023FallQuestComplete("accountChanging"), // event2023Fall + //#endregion }); } if (isNeedToUpdateLoginInfo) { diff --git a/src/components/ModalPopup/ModalNotification.tsx b/src/components/ModalPopup/ModalNotification.tsx index 172ad28bb..9ce001f1b 100644 --- a/src/components/ModalPopup/ModalNotification.tsx +++ b/src/components/ModalPopup/ModalNotification.tsx @@ -1,6 +1,7 @@ import { useCallback, useRef } from "react"; import { useTranslation } from "react-i18next"; +import { useEvent2023FallQuestComplete } from "hooks/event/useEvent2023FallQuestComplete"; import { useFetchRecoilState, useValueRecoilState, @@ -64,6 +65,9 @@ const ModalNotification = ({ const notificationOptions = useValueRecoilState("notificationOptions"); const fetchNotificationOptions = useFetchRecoilState("notificationOptions"); const isAxiosCalled = useRef(false); + //#region event2023Fall + const event2023FallQuestComplete = useEvent2023FallQuestComplete(); + //#endregion const styleTitle = { ...theme.font18, @@ -108,6 +112,11 @@ const ModalNotification = ({ }); fetchNotificationOptions(); isAxiosCalled.current = false; + + //#region event2023Fall + if (optionName === "advertisement" && value) + event2023FallQuestComplete("adPushAgreement"); + //#endregion }, [deviceToken] ); @@ -139,6 +148,10 @@ const ModalNotification = ({ }); fetchNotificationOptions(); isAxiosCalled.current = false; + + //#region event2023Fall + if (value) event2023FallQuestComplete("adPushAgreement"); + //#endregion }, [deviceToken] ); From 511321bbf2137b11f7cd218dc2b4d13a053d19f8 Mon Sep 17 00:00:00 2001 From: 14Kgun Date: Sat, 23 Sep 2023 03:33:57 +0900 Subject: [PATCH 3/4] Fix: dependency array --- src/components/ModalPopup/ModalNotification.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ModalPopup/ModalNotification.tsx b/src/components/ModalPopup/ModalNotification.tsx index 9ce001f1b..fe6da26f5 100644 --- a/src/components/ModalPopup/ModalNotification.tsx +++ b/src/components/ModalPopup/ModalNotification.tsx @@ -118,7 +118,7 @@ const ModalNotification = ({ event2023FallQuestComplete("adPushAgreement"); //#endregion }, - [deviceToken] + [deviceToken, event2023FallQuestComplete] ); const onChangeNotificationAll = useCallback( async (value: boolean) => { @@ -153,7 +153,7 @@ const ModalNotification = ({ if (value) event2023FallQuestComplete("adPushAgreement"); //#endregion }, - [deviceToken] + [deviceToken, event2023FallQuestComplete] ); const onChangeNotificationChatting = useCallback( onChangeNotificationOption("chatting"), From 757500011b4ca5dfd8f170118f05d990b3e2da6e Mon Sep 17 00:00:00 2001 From: 14Kgun Date: Sat, 23 Sep 2023 04:15:37 +0900 Subject: [PATCH 4/4] Fix: 2023fallTicket1.svg and 2023fallTicket2.svg --- src/static/events/2023fallTicket1.svg | 4 ++-- src/static/events/2023fallTicket2.svg | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/static/events/2023fallTicket1.svg b/src/static/events/2023fallTicket1.svg index 99c6488da..1ebbc1424 100644 --- a/src/static/events/2023fallTicket1.svg +++ b/src/static/events/2023fallTicket1.svg @@ -1,11 +1,11 @@ - + - + diff --git a/src/static/events/2023fallTicket2.svg b/src/static/events/2023fallTicket2.svg index 9a21f5d0b..78fb37de1 100644 --- a/src/static/events/2023fallTicket2.svg +++ b/src/static/events/2023fallTicket2.svg @@ -1,11 +1,11 @@ - + - +