Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

모임 신청 취소하기 다이얼로그 MDS로 교체 #922

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading