From 04a0eda4f0c613706af2dbb26e01657aa7e7802b Mon Sep 17 00:00:00 2001 From: Parksangwoo Date: Sun, 21 Jul 2024 01:26:15 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B0=80=EC=A1=B1=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=EC=8B=9C=20=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/challenge/postCreateChallenge.ts | 2 +- src/pages/MainPage.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/apis/challenge/postCreateChallenge.ts b/src/apis/challenge/postCreateChallenge.ts index 6b7c989..8311dfc 100644 --- a/src/apis/challenge/postCreateChallenge.ts +++ b/src/apis/challenge/postCreateChallenge.ts @@ -23,7 +23,7 @@ export const useCreateChallenge = () => { mutationFn: () => postCreateChallenge(challengeDate), onSettled: () => queryClient.invalidateQueries({ - queryKey: [API.CHALLENGE.STARTDATE], + queryKey: [API.CHALLENGE.TODAY], }), }); }; diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index 427ee21..ea4955d 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -22,7 +22,12 @@ const MainPage = () => { const { openModal, isOpen } = useModalStore(); useEffect(() => { - if (!isOpen && !familyLoading && familyList?.length === 1) { + if ( + !isOpen && + !familyLoading && + familyList?.length === 1 && + queryData['code'] + ) { openModal({ content: , showCloseBtn: true,