diff --git a/package.json b/package.json
index fe44b089..dd03c085 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"@sopt-makers/fonts": "^2.0.1",
"@sopt-makers/icons": "^1.0.5",
"@sopt-makers/playground-common": "^1.5.2",
- "@sopt-makers/ui": "^2.4.2",
+ "@sopt-makers/ui": "^2.4.4",
"@stitches/react": "^1.2.8",
"@tanstack/react-query": "^4.10.3",
"@types/autosize": "^4.0.3",
diff --git a/src/components/page/meetingDetail/MeetingController/Modal/Confirm/HostConfirmModal.tsx b/src/components/page/meetingDetail/MeetingController/Modal/Confirm/HostConfirmModal.tsx
deleted file mode 100644
index f7cea061..00000000
--- a/src/components/page/meetingDetail/MeetingController/Modal/Confirm/HostConfirmModal.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import ConfirmModal from '@components/modal/ConfirmModal';
-
-interface HostConfirmModalProps {
- isModalOpened: boolean;
- handleModalClose: () => void;
- handleConfirm: () => void;
-}
-
-const HostConfirmModal = ({ isModalOpened, handleModalClose, handleConfirm }: HostConfirmModalProps) => {
- return (
-
- );
-};
-
-export default HostConfirmModal;
diff --git a/src/components/page/meetingDetail/MeetingController/index.tsx b/src/components/page/meetingDetail/MeetingController/index.tsx
index 9a990550..c6e6e63f 100644
--- a/src/components/page/meetingDetail/MeetingController/index.tsx
+++ b/src/components/page/meetingDetail/MeetingController/index.tsx
@@ -8,7 +8,6 @@ import dayjs from 'dayjs';
import { playgroundLink } from '@sopt-makers/playground-common';
import useModal from '@hooks/useModal';
import DefaultModal from '@components/modal/DefaultModal';
-import HostConfirmModal from './Modal/Confirm/HostConfirmModal';
import ProfileConfirmModal from './Modal/Confirm/ProfileConfirmModal';
import GuestConfirmModal from './Modal/Confirm/GuestConfirmModal';
import ApplicationModalContent from './Modal/Content/ApplicationModalContent';
@@ -93,11 +92,6 @@ const MeetingController = ({
const meetingId = router.query.id;
const isRecruiting = status === ERecruitmentStatus.RECRUITING;
- const {
- isModalOpened: isHostModalOpened,
- handleModalOpen: handleHostModalOpen,
- handleModalClose: handleHostModalClose,
- } = useModal();
const {
isModalOpened: isGuestModalOpened,
handleModalOpen: handleGuestModalOpen,
@@ -122,6 +116,30 @@ const MeetingController = ({
setModalTitle(`모집 현황 (${approvedApplyCount}/${capacity}명)`);
};
+ const handleHostModalOpen = () => {
+ const dialogOption: DialogOptionType = {
+ title: '모임을 삭제하시겠습니까?',
+ description: '삭제한 모임은 되돌릴 수 없어요',
+ type: 'default',
+ typeOptions: {
+ cancelButtonText: '취소',
+ approveButtonText: '삭제하기',
+ buttonFunction: handleDeleteMeeting,
+ },
+ };
+ dialogOpen(dialogOption);
+ };
+
+ const handleDeleteMeeting = () => {
+ queryClient.invalidateQueries({ queryKey: ['fetchMeetingList'] });
+ mutateMeetingDeletion(Number(meetingId), {
+ onSuccess: () => {
+ dialogClose();
+ router.push('/');
+ },
+ });
+ };
+
const handleApplicationModal = () => {
if (!me?.hasActivities) {
handleProfileModalOpen();
@@ -209,16 +227,6 @@ const MeetingController = ({
});
};
- const handleDeleteMeeting = () => {
- queryClient.invalidateQueries({ queryKey: ['fetchMeetingList'] });
- mutateMeetingDeletion(Number(meetingId), {
- onSuccess: () => {
- router.push('/');
- },
- });
- handleHostModalClose();
- };
-
return (
<>
@@ -272,11 +280,6 @@ const MeetingController = ({
)}
-