From f2a5212e89d6af28715e69434d4ef672b93d7ae7 Mon Sep 17 00:00:00 2001 From: na-reum Date: Sun, 10 Dec 2023 03:22:31 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=94=BC=EB=93=9C=20=EC=9E=91=EC=84=B1?= =?UTF-8?q?=EC=9D=B4=20=EC=95=88=EB=96=A0=EC=9A=94=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/user/index.ts | 2 +- .../FeedCreateWithSelectMeetingModal.tsx | 2 +- src/components/modal/FloatingButtonModal.tsx | 22 ++++++++++++++----- .../page/postList/FloatingButton/index.tsx | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/api/user/index.ts b/src/api/user/index.ts index 7a772a87..8b841998 100644 --- a/src/api/user/index.ts +++ b/src/api/user/index.ts @@ -54,5 +54,5 @@ export const fetchMyProfile = async () => { }; export const fetchMeetingListOfUserAttend = async () => { - return api.get>('/user/v2/meeting/all'); + return api.get('/user/v2/meeting/all'); }; diff --git a/src/components/feed/Modal/FeedCreateWithSelectMeetingModal.tsx b/src/components/feed/Modal/FeedCreateWithSelectMeetingModal.tsx index 2dcb3f9e..b9158a78 100644 --- a/src/components/feed/Modal/FeedCreateWithSelectMeetingModal.tsx +++ b/src/components/feed/Modal/FeedCreateWithSelectMeetingModal.tsx @@ -83,7 +83,7 @@ function FeedCreateWithSelectMeetingModal({ isModalOpened, handleModalClose }: C {!isFetchAttendMeetingLoading && ( { - const { isActive } = props; +const FloatingButtonModal = (props: { isActive: boolean; handleOptionClose: () => void }) => { + const { isActive, handleOptionClose } = props; const router = useRouter(); const overlay = useOverlay(); const { data: me } = useQueryMyProfile(); @@ -19,11 +19,23 @@ const FloatingButtonModal = (props: { isActive: boolean }) => { const { mutate: fetchUserAttendMeetingListMutate } = useMutation(fetchMeetingListOfUserAttend, { onSuccess: data => { queryClient.setQueryData(['fetchMeetingList', 'all'], data); - if (data.data.data.length === 0) { - overlay.open(({ isOpen, close }) => ); + if (data.data.length === 0) { + overlay.open(({ isOpen, close }) => ( + { + close(), handleOptionClose(); + }} + /> + )); } else { overlay.open(({ isOpen, close }) => ( - + { + close(), handleOptionClose(); + }} + /> )); } }, diff --git a/src/components/page/postList/FloatingButton/index.tsx b/src/components/page/postList/FloatingButton/index.tsx index 3adc6c09..775fa199 100644 --- a/src/components/page/postList/FloatingButton/index.tsx +++ b/src/components/page/postList/FloatingButton/index.tsx @@ -30,7 +30,7 @@ function FloatingButton() { - + );