import React from 'react' import { Button, Modal } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import AccessibleModal from '../../../../shared/components/accessible-modal' import { useFileTreeActionable } from '../../contexts/file-tree-actionable' function FileTreeModalDelete() { const { t } = useTranslation() const { isDeleting, inFlight, finishDeleting, actionedEntities, cancel, error } = useFileTreeActionable() if (!isDeleting) return null // the modal will not be rendered; return early function handleHide() { cancel() } function handleDelete() { finishDeleting() } return ( {t('delete')}

{t('sure_you_want_to_delete')}

{error && (
{t('generic_something_went_wrong')}
)}
{inFlight ? ( ) : ( <> )}
) } export default FileTreeModalDelete