Skip to content

Commit

Permalink
Merge pull request #99 from Ong-gi-Jong-gi/dev
Browse files Browse the repository at this point in the history
[Deploy] 리다이렉트 관련 로직 추가본 배포
  • Loading branch information
SangWoo9734 authored Jul 20, 2024
2 parents 56ee95d + 8bacaea commit 9c6face
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apis/challenge/postCreateChallenge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const useCreateChallenge = () => {
mutationFn: () => postCreateChallenge(challengeDate),
onSettled: () =>
queryClient.invalidateQueries({
queryKey: [API.CHALLENGE.STARTDATE],
queryKey: [API.CHALLENGE.TODAY],
}),
});
};
7 changes: 6 additions & 1 deletion src/pages/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: <InviteModal code={queryData['code'] as string} />,
showCloseBtn: true,
Expand Down

0 comments on commit 9c6face

Please sign in to comment.