Skip to content
Snippets Groups Projects
Commit a32d6800 authored by Tania Fecheta's avatar Tania Fecheta
Browse files

fix(ManuscriptFileList): functionality of preview and download buttons from files

parent 5df44b05
No related branches found
No related tags found
3 merge requests!233S26 updates,!230S26 Updates,!226fix(ManuscriptFileList): functionality of preview and download buttons from files
import PropTypes from 'prop-types'
import React, { Fragment } from 'react'
import { compose } from 'recompose'
import { ManuscriptFileSection } from 'pubsweet-component-faraday-ui'
import { withFilePreview, withFileDownload } from '../helpers'
import { withFilePreview, withFileDownload } from '../'
const ManuscriptFileList = ({
files: { manuscripts = [], coverLetter = [], supplementary = [] },
......@@ -43,18 +44,15 @@ ManuscriptFileList.propTypes = {
supplementary: PropTypes.arrayOf(PropTypes.object),
}),
/** Callback function fired when delete icon is pressed. */
onDelete: PropTypes.func,
onDelete: PropTypes.func, // eslint-disable-line
/** Callback function fired when download icon is pressed. */
onDownload: PropTypes.func,
onDownload: PropTypes.func, // eslint-disable-line
/** Callback function fired when preview icon is pressed. */
onPreview: PropTypes.func,
onPreview: PropTypes.func, // eslint-disable-line
}
ManuscriptFileList.defaultProps = {
files: {},
onDelete: () => {},
onDownload: () => {},
onPreview: () => {},
}
export default withFilePreview(withFileDownload(ManuscriptFileList))
export default compose(withFilePreview, withFileDownload)(ManuscriptFileList)
......@@ -35,16 +35,14 @@ ManuscriptFileSection.propTypes = {
/** Category name of uploaded files. */
label: PropTypes.string,
/** Callback function fired when download icon is pressed. */
onDownload: PropTypes.func,
onDownload: PropTypes.func, // eslint-disable-line
/** Callback function fired when preview icon is pressed. */
onPreview: PropTypes.func,
onPreview: PropTypes.func, // eslint-disable-line
}
ManuscriptFileSection.defaultProps = {
list: [],
label: '',
onDownload: () => {},
onPreview: () => {},
}
export default ManuscriptFileSection
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment