import * as React from 'react'; import { useTranslation } from 'react-i18next'; interface ModalProps { handleSubmit: () => void; isCancellable: boolean; handleCancel?: () => void; render: () => JSX.Element; modalState: string; isError: boolean; errorMessage?: string; textDelete?: boolean; } const Modal = (props: ModalProps) => { const { t } = useTranslation(); return (
{props.render()}
{props.isCancellable && ( )}
{props.isError && (

{props.errorMessage}

)}
); }; export default Modal;