diff --git a/packages/component-manuscript/src/components/Manuscript.js b/packages/component-manuscript/src/components/Manuscript.js index 113bc4b18c02a9ca9a8e28ef801116cf75aecc8e..af9097ad071ebbc32f160e6eea85be62d970c95d 100644 --- a/packages/component-manuscript/src/components/Manuscript.js +++ b/packages/component-manuscript/src/components/Manuscript.js @@ -5,7 +5,13 @@ import classes from './Manuscript.local.scss' // TODO: convert user teams to roles (see SimpleEditorWrapper)? -const Manuscript = ({ content, currentUser, fileUpload, history, updateManuscript }) => ( +const Manuscript = ({ + content, + currentUser, + fileUpload, + history, + updateManuscript, +}) => ( <SimpleEditor classes={classes.fullscreen} content={content} diff --git a/packages/component-manuscript/src/components/ManuscriptPage.js b/packages/component-manuscript/src/components/ManuscriptPage.js index ef878cd0666eefeed0837d553fa0b7ddfb148d21..f59033cb5eacbd621b8c09ab805171026364db2a 100644 --- a/packages/component-manuscript/src/components/ManuscriptPage.js +++ b/packages/component-manuscript/src/components/ManuscriptPage.js @@ -2,13 +2,20 @@ import { compose, withHandlers } from 'recompose' import { connect } from 'react-redux' import { actions } from 'pubsweet-client' import { ConnectPage } from 'xpub-connect' -import { selectCurrentUser, selectCollection, selectFragment } from 'xpub-selectors' +import { + selectCurrentUser, + selectCollection, + selectFragment, +} from 'xpub-selectors' import Manuscript from './Manuscript' export default compose( ConnectPage(({ match }) => [ actions.getCollection({ id: match.params.project }), - actions.getFragment({ id: match.params.project }, { id: match.params.version }) + actions.getFragment( + { id: match.params.project }, + { id: match.params.version }, + ), ]), connect( (state, { match }) => { @@ -22,16 +29,16 @@ export default compose( }, { fileUpload: actions.fileUpload, - updateVersion: actions.updateFragment - } + updateVersion: actions.updateFragment, + }, ), withHandlers({ updateManuscript: ({ updateVersion, project, version }) => data => { return updateVersion(project, { id: version.id, rev: version.rev, - ...data + ...data, }) - } - }) + }, + }), )(Manuscript) diff --git a/packages/component-manuscript/src/index.js b/packages/component-manuscript/src/index.js index 0225ff41f4787662ca6fbc4ecc49c3894f11810c..6f1f42a64b1ecf4a71345e76fa416d89015cb96c 100644 --- a/packages/component-manuscript/src/index.js +++ b/packages/component-manuscript/src/index.js @@ -1,7 +1,5 @@ module.exports = { frontend: { - components: [ - () => require('./components') - ] - } + components: [() => require('./components')], + }, } diff --git a/packages/component-manuscript/styleguide.config.js b/packages/component-manuscript/styleguide.config.js index 9869e0b83404dc6cfd4ac7a2c15a4ebe13b2f147..79b898ac6b7c94d4a8d81aa9f2f8d212ac7edcc1 100644 --- a/packages/component-manuscript/styleguide.config.js +++ b/packages/component-manuscript/styleguide.config.js @@ -1,21 +1,23 @@ module.exports = { title: 'xpub-manuscript style guide', styleguideComponents: { - StyleGuideRenderer: require.resolve('xpub-styleguide/src/components/StyleGuideRenderer'), - Wrapper: require.resolve('xpub-styleguide/src/components/Wrapper') + StyleGuideRenderer: require.resolve( + 'xpub-styleguide/src/components/StyleGuideRenderer', + ), + Wrapper: require.resolve('xpub-styleguide/src/components/Wrapper'), }, context: { - faker: 'faker' + faker: 'faker', }, skipComponentsWithoutExample: true, webpackConfig: require('./webpack.config.js'), serverPort: 6063, theme: { fontFamily: { - base: '"Fira Sans", sans-serif' + base: '"Fira Sans", sans-serif', }, color: { - link: 'cornflowerblue' - } - } + link: 'cornflowerblue', + }, + }, }