import React, { useCallback } from 'react'; import withModal from 'components/modals/withModal'; import Button from 'components/ui/Button'; const Confirm = ({ payload: { question, confirmation, onConfirm }, onClose }) => { const handleConfirm = useCallback(() => { onClose(false); onConfirm(); }, []); return ( <>

{question}

); }; export default withModal({ name: 'confirm' })(Confirm);