/* eslint-disable react/prop-types */
import React from 'react';
import {
Button,
Modal, ModalHeader, ModalBody, ModalFooter,
} from 'reactstrap';
import UserPicture from '../User/UserPicture';
import Username from '../User/Username';
export default class DeleteAttachmentModal extends React.Component {
constructor(props) {
super(props);
this._onDeleteConfirm = this._onDeleteConfirm.bind(this);
}
_onDeleteConfirm() {
this.props.onAttachmentDeleteClickedConfirm(this.props.attachmentToDelete);
}
iconNameByFormat(format) {
if (format.match(/image\/.+/i)) {
return 'icon-picture';
}
return 'icon-doc';
}
renderByFileFormat(attachment) {
const content = (attachment.fileFormat.match(/image\/.+/i))
?
: '';
return (
{attachment.originalName}
uploaded by