import { useTranslation } from 'react-i18next'; import { ActiveState } from '../models/misc'; import WrapperModal from './WrapperModal'; export default function ConfirmationModal({ message, modalState, setModalState, submitLabel, handleSubmit, cancelLabel, handleCancel, }: { message: string; modalState: ActiveState; setModalState: (state: ActiveState) => void; submitLabel: string; handleSubmit: () => void; cancelLabel?: string; handleCancel?: () => void; }) { const { t } = useTranslation(); return ( <> {modalState === 'ACTIVE' && ( { setModalState('INACTIVE'); handleCancel && handleCancel(); }} >

{message}

)} ); }