From 844f633f31e177fb2f3f5e919e7b9bc6db3dbb33 Mon Sep 17 00:00:00 2001 From: hyobicho Date: Tue, 19 Sep 2023 16:38:40 +0900 Subject: [PATCH 1/9] =?UTF-8?q?[Fix]=20[GGFE-269]=20=EB=AA=A8=EB=B0=94?= =?UTF-8?q?=EC=9D=BC=20=ED=82=A4=ED=8C=A8=EB=93=9C=20=EC=A0=95=EA=B7=9C?= =?UTF-8?q?=EC=8B=9D=20=ED=8C=A8=ED=84=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminUserCoinModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/modal/admin/AdminUserCoinModal.tsx b/components/modal/admin/AdminUserCoinModal.tsx index 43cc76c79..8e0561498 100644 --- a/components/modal/admin/AdminUserCoinModal.tsx +++ b/components/modal/admin/AdminUserCoinModal.tsx @@ -151,7 +151,7 @@ export default function AdminUserCoinModal(props: { intraId: string }) { name='change' type='number' inputMode='numeric' - pattern='[0-9]*' + pattern='^[+-]?\d*$' placeholder={'코인 지급(차감)액을 입력하세요'} onChange={inputHandler} /> From dfb58ef72ff6a8907a5a3f598dfe090887ca48a8 Mon Sep 17 00:00:00 2001 From: PHJoon Date: Tue, 19 Sep 2023 16:42:12 +0900 Subject: [PATCH 2/9] =?UTF-8?q?[Fix]=20[GGFE-274]=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=9E=90=20=ED=94=BC=EB=93=9C=EB=B0=B1=20=EC=99=84=EB=A3=8C=20?= =?UTF-8?q?=EC=95=8C=EB=A6=BC=20=EB=B3=B4=EB=82=B4=EA=B8=B0=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminFeedbackCheckModal.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/modal/admin/AdminFeedbackCheckModal.tsx b/components/modal/admin/AdminFeedbackCheckModal.tsx index e7e54cf61..639a3874e 100644 --- a/components/modal/admin/AdminFeedbackCheckModal.tsx +++ b/components/modal/admin/AdminFeedbackCheckModal.tsx @@ -2,6 +2,7 @@ import { useSetRecoilState } from 'recoil'; import { IoSend } from 'react-icons/io5'; import { instanceInManage } from 'utils/axios'; import { modalState } from 'utils/recoil/modal'; +import { toastState } from 'utils/recoil/toast'; import styles from 'styles/admin/modal/AdminFeedbackCheck.module.scss'; interface IfeedbackProps { @@ -16,6 +17,7 @@ export default function AdminFeedbackCheck({ isSolved, }: IfeedbackProps) { const setModal = useSetRecoilState(modalState); + const setSnackBar = useSetRecoilState(toastState); const sendNotificationHandler = async (isSend: boolean) => { try { @@ -29,6 +31,12 @@ export default function AdminFeedbackCheck({ : '피드백이 반영되었습니다.', // sendMail: isSend, todo: 슬랙으로 보내는 것으로 변경 }); + setSnackBar({ + toastName: 'noti user', + severity: 'success', + message: `알림이 성공적으로 전송되었습니다!`, + clicked: true, + }); setModal({ modalName: null }); } catch (e) { console.error('SW03'); From d891dff50b02de849962e0157e10eee44773561c Mon Sep 17 00:00:00 2001 From: hyobicho Date: Tue, 19 Sep 2023 16:56:57 +0900 Subject: [PATCH 3/9] =?UTF-8?q?[Fix]=20[GGFE-269]=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=9E=90=20=EC=BD=94=EC=9D=B8=20=EC=88=98=EC=A0=95=20=EB=AA=A8?= =?UTF-8?q?=EB=B0=94=EC=9D=BC=20=ED=82=A4=ED=8C=A8=EB=93=9C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminUserCoinModal.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/modal/admin/AdminUserCoinModal.tsx b/components/modal/admin/AdminUserCoinModal.tsx index 8e0561498..ccabedb18 100644 --- a/components/modal/admin/AdminUserCoinModal.tsx +++ b/components/modal/admin/AdminUserCoinModal.tsx @@ -150,8 +150,6 @@ export default function AdminUserCoinModal(props: { intraId: string }) { className={styles.coinBlank} name='change' type='number' - inputMode='numeric' - pattern='^[+-]?\d*$' placeholder={'코인 지급(차감)액을 입력하세요'} onChange={inputHandler} /> From 7ce22e7f22eca8d7e85c456cbdc82bdb4c638efe Mon Sep 17 00:00:00 2001 From: hyobicho Date: Tue, 19 Sep 2023 16:57:30 +0900 Subject: [PATCH 4/9] =?UTF-8?q?[Feat]=20[GGFE-269]=20=EC=A0=90=EC=88=98=20?= =?UTF-8?q?=EC=9E=85=EB=A0=A5=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=88=AB?= =?UTF-8?q?=EC=9E=90=20=ED=82=A4=ED=8C=A8=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/afterGame/InputScore.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/modal/afterGame/InputScore.tsx b/components/modal/afterGame/InputScore.tsx index 9fa6405f5..2614bd1a1 100644 --- a/components/modal/afterGame/InputScore.tsx +++ b/components/modal/afterGame/InputScore.tsx @@ -26,6 +26,8 @@ export default function InputScore({ id='myTeamScore' name='myTeamScore' type='number' + inputMode='numeric' + pattern='[0-9]*' value={result.myTeamScore} min={0} max={2} From b409b181fc6de201621f8d88c0080e430a72f531 Mon Sep 17 00:00:00 2001 From: hyobicho Date: Tue, 19 Sep 2023 18:08:55 +0900 Subject: [PATCH 5/9] =?UTF-8?q?[Feat]=20[GGFE-269]=20=EC=BD=94=EC=9D=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EB=82=B4=EC=9A=A9=2030=EC=9E=90=20?= =?UTF-8?q?=EC=A0=9C=ED=95=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/admin/AdminUserCoinModal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/modal/admin/AdminUserCoinModal.tsx b/components/modal/admin/AdminUserCoinModal.tsx index ccabedb18..03ed58552 100644 --- a/components/modal/admin/AdminUserCoinModal.tsx +++ b/components/modal/admin/AdminUserCoinModal.tsx @@ -7,6 +7,7 @@ import { toastState } from 'utils/recoil/toast'; import styles from 'styles/admin/modal/AdminUserCoin.module.scss'; export default function AdminUserCoinModal(props: { intraId: string }) { + const MAX_LENGTH = 30; const [currentCoin, setCurrentCoin] = useState(0); const [userCoinInfo, setUserCoinInfo] = useState({ intraId: props.intraId, @@ -131,7 +132,8 @@ export default function AdminUserCoinModal(props: { intraId: string }) { From c85a6af25a6af93354bdda1f41d4ae1b8964eed7 Mon Sep 17 00:00:00 2001 From: hyobicho Date: Tue, 19 Sep 2023 18:09:27 +0900 Subject: [PATCH 6/9] =?UTF-8?q?[Style]=20[GGFE-269]=20=EC=BD=94=EC=9D=B8?= =?UTF-8?q?=EB=82=B4=EC=97=AD=20=EB=AA=A8=EB=8B=AC=20=EC=A0=95=EB=A0=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- styles/modal/store/CoinHistoryDetails.module.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/styles/modal/store/CoinHistoryDetails.module.scss b/styles/modal/store/CoinHistoryDetails.module.scss index d539ff871..7b4d9cf22 100644 --- a/styles/modal/store/CoinHistoryDetails.module.scss +++ b/styles/modal/store/CoinHistoryDetails.module.scss @@ -2,6 +2,7 @@ .data { display: flex; + width: 100%; padding: 0.5rem; margin-bottom: 0.2rem; font-size: 1rem; @@ -16,15 +17,19 @@ .section1 { display: flex; align-items: center; + width: 85%; .icon { display: flex; - align-items: center; + width: 10%; margin-right: 0.5rem; + align-items: center; } .content { + width: 90%; .history { color: black; word-break: keep-all; + word-wrap: break-word; } .date { font-size: 0.8rem; From 51af0277952183b36b3e904d1d4b7ccecf9fb60e Mon Sep 17 00:00:00 2001 From: Sangmin Park Date: Tue, 19 Sep 2023 18:11:46 +0900 Subject: [PATCH 7/9] =?UTF-8?q?[Bug]=20[GGFE-261]=EC=B6=9C=EC=84=9D?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/ModalProvider.tsx | 5 +++++ components/modal/event/WelcomeModal.tsx | 5 +---- components/modal/statChange/StatChangeModal.tsx | 7 +------ 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/components/modal/ModalProvider.tsx b/components/modal/ModalProvider.tsx index 76b445624..db92717b1 100644 --- a/components/modal/ModalProvider.tsx +++ b/components/modal/ModalProvider.tsx @@ -1,4 +1,5 @@ import { useEffect } from 'react'; +import { useQueryClient } from 'react-query'; import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil'; import { reloadMatchState } from 'utils/recoil/match'; import { modalState, modalTypeState } from 'utils/recoil/modal'; @@ -11,6 +12,7 @@ export default function ModalProvider() { const [{ modalName, isAttended }, setModal] = useRecoilState(modalState); const setReloadMatch = useSetRecoilState(reloadMatchState); const modalType = useRecoilValue(modalTypeState); + const queryClient = useQueryClient(); useEffect(() => { setModalOutsideScroll(); @@ -25,6 +27,9 @@ export default function ModalProvider() { if (modalName === 'MATCH-CANCEL') setReloadMatch(true); else if (modalName === 'EVENT-ANNOUNCEMENT' && isAttended === false) { setModal({ modalName: 'EVENT-WELCOME' }); + } else if (modalName === 'COIN-ANIMATION') { + queryClient.invalidateQueries('user'); + setModal({ modalName: null }); } else { setModal({ modalName: null }); } diff --git a/components/modal/event/WelcomeModal.tsx b/components/modal/event/WelcomeModal.tsx index 26739d969..90c6d1b63 100644 --- a/components/modal/event/WelcomeModal.tsx +++ b/components/modal/event/WelcomeModal.tsx @@ -1,5 +1,4 @@ import { useState } from 'react'; -import { useQueryClient } from 'react-query'; import { useSetRecoilState } from 'recoil'; import { Modal } from 'types/modalTypes'; import { instance } from 'utils/axios'; @@ -16,7 +15,6 @@ export default function WelcomeModal() { const setModal = useSetRecoilState(modalState); const setError = useSetRecoilState(errorState); const [buttonState, setButtonState] = useState(false); - const queryClient = useQueryClient(); const [isLoading, setIsLoading] = useState(false); const content = { title: 'Welcome!', @@ -28,7 +26,6 @@ export default function WelcomeModal() { try { setIsLoading(true); const res = await instance.post(`/pingpong/users/attendance`); - queryClient.invalidateQueries('user'); return res.data; } catch (e: any) { if (e.response.status === 409) { @@ -92,7 +89,7 @@ export default function WelcomeModal() { value='출석하기' isLoading={isLoading} /> - {buttonState && } + {buttonState && } diff --git a/components/modal/statChange/StatChangeModal.tsx b/components/modal/statChange/StatChangeModal.tsx index 8cf1eecd6..063ff9546 100644 --- a/components/modal/statChange/StatChangeModal.tsx +++ b/components/modal/statChange/StatChangeModal.tsx @@ -1,5 +1,4 @@ import { useEffect, useState } from 'react'; -import { useQueryClient } from 'react-query'; import { useSetRecoilState } from 'recoil'; import { CoinResult } from 'types/coinTypes'; import { GameResult } from 'types/gameTypes'; @@ -9,7 +8,7 @@ import { reloadMatchState } from 'utils/recoil/match'; import { modalState } from 'utils/recoil/modal'; import ExpStat from 'components/modal/statChange/ExpStat'; import PppStat from 'components/modal/statChange/PppStat'; -import useAxiosGet, { useMockAxiosGet } from 'hooks/useAxiosGet'; +import useAxiosGet from 'hooks/useAxiosGet'; import styles from 'styles/modal/afterGame/StatChangeModal.module.scss'; export default function StatChangeModal({ gameId, mode }: Exp) { @@ -17,7 +16,6 @@ export default function StatChangeModal({ gameId, mode }: Exp) { const setReloadMatch = useSetRecoilState(reloadMatchState); const setError = useSetRecoilState(errorState); const [stat, setStat] = useState(); - const queryClient = useQueryClient(); const getExpHandler = useAxiosGet({ url: `/pingpong/games/${gameId}/result/${mode?.toLowerCase()}`, @@ -28,9 +26,6 @@ export default function StatChangeModal({ gameId, mode }: Exp) { useEffect(() => { getExpHandler(); - return () => { - queryClient.invalidateQueries('user'); - }; }, []); const closeModal = () => { From ef85d3c64e670b33dc9fcbd13d48277be8920ad7 Mon Sep 17 00:00:00 2001 From: Sangmin Park Date: Tue, 19 Sep 2023 19:47:44 +0900 Subject: [PATCH 8/9] =?UTF-8?q?[Feat]=20[GGFE-261]=20=EC=B6=9C=EC=84=9D?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/ModalProvider.tsx | 5 +++-- components/modal/event/WelcomeModal.tsx | 2 +- components/modal/statChange/CoinChangeModal.tsx | 9 +++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/components/modal/ModalProvider.tsx b/components/modal/ModalProvider.tsx index db92717b1..1751bbdcc 100644 --- a/components/modal/ModalProvider.tsx +++ b/components/modal/ModalProvider.tsx @@ -24,8 +24,9 @@ export default function ModalProvider() { const closeModalHandler = (e: React.MouseEvent) => { if (modalName?.split('-')[0] === 'FIXED') return; if (e.target instanceof HTMLDivElement && e.target.id === 'modalOutside') { - if (modalName === 'MATCH-CANCEL') setReloadMatch(true); - else if (modalName === 'EVENT-ANNOUNCEMENT' && isAttended === false) { + if (modalName === 'MATCH-CANCEL') { + setReloadMatch(true); + } else if (modalName === 'EVENT-ANNOUNCEMENT' && isAttended === false) { setModal({ modalName: 'EVENT-WELCOME' }); } else if (modalName === 'COIN-ANIMATION') { queryClient.invalidateQueries('user'); diff --git a/components/modal/event/WelcomeModal.tsx b/components/modal/event/WelcomeModal.tsx index 90c6d1b63..1e54e3a14 100644 --- a/components/modal/event/WelcomeModal.tsx +++ b/components/modal/event/WelcomeModal.tsx @@ -49,7 +49,7 @@ export default function WelcomeModal() { try { setButtonState(true); const updatedcoin = await postCoinHandler(); - if (updatedcoin == null) return; + if (updatedcoin === null) return; setModal({ modalName: 'COIN-ANIMATION', CoinResult: { diff --git a/components/modal/statChange/CoinChangeModal.tsx b/components/modal/statChange/CoinChangeModal.tsx index 432f05378..007a8c8ab 100644 --- a/components/modal/statChange/CoinChangeModal.tsx +++ b/components/modal/statChange/CoinChangeModal.tsx @@ -1,4 +1,6 @@ import Image from 'next/image'; +import { useEffect } from 'react'; +import { useQueryClient } from 'react-query'; import { useSetRecoilState } from 'recoil'; import { CoinResult } from 'types/coinTypes'; import { modalState } from 'utils/recoil/modal'; @@ -9,6 +11,13 @@ import styles from 'styles/modal/CoinChangeModal.module.scss'; export default function CoinChangeModal(coin: CoinResult) { const setModal = useSetRecoilState(modalState); + const queryClient = useQueryClient(); + + useEffect(() => { + return () => { + queryClient.invalidateQueries('user'); + }; + }, []); const closeModal = () => { setModal({ modalName: null }); From dacc42ee01d58dfcf072de3d293b76351b901470 Mon Sep 17 00:00:00 2001 From: hyobicho Date: Tue, 19 Sep 2023 20:34:22 +0900 Subject: [PATCH 9/9] =?UTF-8?q?[Fix]=20[GGFE-277]=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EA=B0=80=EC=9D=B4=EB=93=9C=20=EB=85=B8=EC=85=98=20?= =?UTF-8?q?=EB=A7=81=ED=81=AC=EB=A1=9C=20=EA=B5=90=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Layout/Footer.tsx | 2 +- components/modal/event/WelcomeModal.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/Layout/Footer.tsx b/components/Layout/Footer.tsx index 4a918d46d..0b85a489c 100644 --- a/components/Layout/Footer.tsx +++ b/components/Layout/Footer.tsx @@ -11,7 +11,7 @@ export default function Footer() {
window.open( - 'https://github.com/42organization/42arcade.gg.client/wiki/42gg.kr--%ED%8E%98%EC%9D%B4%EC%A7%80-%EA%B0%80%EC%9D%B4%EB%93%9C' + 'https://www.notion.so/bfbe7ad164d4450295e4978ce3121398?pvs=4' ) } > diff --git a/components/modal/event/WelcomeModal.tsx b/components/modal/event/WelcomeModal.tsx index 1e54e3a14..88cd42799 100644 --- a/components/modal/event/WelcomeModal.tsx +++ b/components/modal/event/WelcomeModal.tsx @@ -40,9 +40,7 @@ export default function WelcomeModal() { }; const openPageManual = () => { - window.open( - 'https://github.com/42organization/42arcade.gg.client/wiki/42gg.kr--%ED%8E%98%EC%9D%B4%EC%A7%80-%EA%B0%80%EC%9D%B4%EB%93%9C' - ); + window.open('https://www.notion.so/bfbe7ad164d4450295e4978ce3121398?pvs=4'); }; const openAttendanceCoin = async () => {