// @flow import React from 'react'; import { Modal } from 'modal/modal'; import { DOMAIN } from 'config'; type Props = { upload: WebFile => void, file: WebFile, closeModal: () => void, updatePublishForm: ({}) => void, }; class ModalConfirmThumbnailUpload extends React.PureComponent { upload() { const { upload, updatePublishForm, closeModal, file } = this.props; upload(file); updatePublishForm({ thumbnailPath: file.path }); closeModal(); } render() { const { closeModal, file } = this.props; console.log('file', file); return ( this.upload()} onAborted={closeModal} >
{file.path || file.name}
); } } export default ModalConfirmThumbnailUpload;