Skip to content

Commit

Permalink
feat: 모임 신청 취소하기 다이얼로그 -> Mds로 교체 (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocahs9 authored Oct 11, 2024
1 parent 33385ec commit f224e59
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion src/components/page/meetingDetail/MeetingController/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useQueryMyProfile } from '@api/API_LEGACY/user/hooks';
import { ampli } from '@/ampli';
import ButtonLoader from '@components/loader/ButtonLoader';
import { useDialog } from '@sopt-makers/ui';
import { ReactNode } from 'react';

interface DetailHeaderProps {
detailData: GetMeetingResponse;
Expand All @@ -50,6 +51,19 @@ interface DetailHeaderProps {
>;
}

interface DialogOptionType {
title: ReactNode;
description: ReactNode;
type?: 'default' | 'danger' | 'single' | undefined;
typeOptions?: TypeOptionsProp;
}

interface TypeOptionsProp {
cancelButtonText?: string;
approveButtonText?: string;
buttonFunction?: () => void;
}

const MeetingController = ({
detailData,
mutateMeetingDeletion,
Expand Down Expand Up @@ -121,7 +135,18 @@ const MeetingController = ({

return;
}
handleGuestModalOpen();

const dialogOption: DialogOptionType = {
title: '신청을 취소하시겠습니까?',
description: '',
type: 'default',
typeOptions: {
cancelButtonText: '돌아가기',
approveButtonText: '취소하기',
buttonFunction: handleCancelApplication,
},
};
dialogOpen(dialogOption);
};

const handleApplicationButton = (textareaValue: string) => {
Expand Down

0 comments on commit f224e59

Please sign in to comment.