diff --git a/packages/components-faraday/src/components/UIComponents/ConfirmationPage.js b/packages/components-faraday/src/components/UIComponents/ConfirmationPage.js index 9419a8bfb235dabfab7d537cb29cc7e699118143..35cd479808558baf671252d8fa3227658c906add 100644 --- a/packages/components-faraday/src/components/UIComponents/ConfirmationPage.js +++ b/packages/components-faraday/src/components/UIComponents/ConfirmationPage.js @@ -1,14 +1,23 @@ import React from 'react' +import classnames from 'classnames' import { compose } from 'recompose' import { connect } from 'react-redux' +import { Button } from '@pubsweet/ui' import { get, isEmpty } from 'lodash' import { withJournal } from 'xpub-journal' import { getFragmentAuthors } from 'pubsweet-components-faraday/src/redux/authors' -const ConfirmationPage = ({ journal, authors = [], location: { state } }) => { +import classes from './UIComponents.local.scss' + +const ConfirmationPage = ({ + journal, + authors = [], + location: { state }, + history, +}) => { const email = get(authors.find(a => a.isCorresponding), 'email') return ( - <div style={{ width: '70vw', margin: '0 auto' }}> + <div className={classnames(classes.container)}> {isEmpty(state) ? ( <h2>Thank you for you submission</h2> ) : ( @@ -16,27 +25,30 @@ const ConfirmationPage = ({ journal, authors = [], location: { state } }) => { <h2>Thank You for Submitting Your Manuscript</h2> <p> Your manuscript has been successfully submitted to{' '} - {journal.metadata.name}. + <b>{journal.metadata.nameText}</b> and assigned the manuscript ID{' '} + <b> + {' '} + <a + href={`/projects/${state.project}/versions/${ + state.version + }/manuscript`} + > + {state.project} + </a> + </b>. </p> <p> - An acknowledgement email will be sent to{' '} - <a href={`mailto:${email}`}>{email}</a> when our system has finished - processing the submission. At that point, you will be able to track - the status of your submission. Please note, this may take a few - minutes. + An acknowledgement email will be sent to {email} when our system has + finished processing the submission. At that point, you will be able + to track the status of your submission. Please note, this may take a + few minutes. </p> <p> - Click{' '} - <a - href={`/projects/${state.project}/versions/${ - state.version - }/manuscript`} - > - {' '} - here{' '} - </a>{' '} - to return to your account in the Manuscript Tracking System. + {`You can keep track of your submission's progress on your dashboard.`} </p> + <Button onClick={() => history.push('/')} primary> + Go to Dashboard + </Button> </div> )} </div> diff --git a/packages/components-faraday/src/components/UIComponents/NotFound.js b/packages/components-faraday/src/components/UIComponents/NotFound.js index e72b54b8bc1fe325a5f336b999676d76b7af9cf6..f0c04c2e25457aeac3160e029e81d6b83e6b48de 100644 --- a/packages/components-faraday/src/components/UIComponents/NotFound.js +++ b/packages/components-faraday/src/components/UIComponents/NotFound.js @@ -1,8 +1,11 @@ import React from 'react' import { Icon } from '@pubsweet/ui' +import classnames from 'classnames' + +import classes from './UIComponents.local.scss' const NotFound = ({ history }) => ( - <div style={{ width: '70vw', margin: '0 auto', textAlign: 'center' }}> + <div className={classnames(classes.container)}> <div> <Icon size={32}>cloud-off</Icon> </div> diff --git a/packages/components-faraday/src/components/UIComponents/UIComponents.local.scss b/packages/components-faraday/src/components/UIComponents/UIComponents.local.scss new file mode 100644 index 0000000000000000000000000000000000000000..10255c4b467b541296f7332916e9f95fe0733440 --- /dev/null +++ b/packages/components-faraday/src/components/UIComponents/UIComponents.local.scss @@ -0,0 +1,9 @@ +.container { + margin: 0 auto; + text-align: center; + width: 70vw; + + a { + color: black; + } +} diff --git a/packages/xpub-faraday/app/config/journal/metadata.js b/packages/xpub-faraday/app/config/journal/metadata.js index 06375b6dc8f4488d5c5323c8bc382305426ce4c3..f099501bf61de0aa128bbd2094665c4dfd1defb2 100644 --- a/packages/xpub-faraday/app/config/journal/metadata.js +++ b/packages/xpub-faraday/app/config/journal/metadata.js @@ -5,4 +5,5 @@ export default { issn: '2474-7394', name: <Logo srcUrl="/assets/hindawi-logo.png" />, logo: '/assets/hindawi-logo.png', + nameText: 'Faraday Journal', } diff --git a/packages/xpub-faraday/app/routes.js b/packages/xpub-faraday/app/routes.js index 93cd5915e130ce274a307c2692879f5dda483128..36a635a46bcf18cea3dfc0711a2150609808eeaf 100644 --- a/packages/xpub-faraday/app/routes.js +++ b/packages/xpub-faraday/app/routes.js @@ -1,5 +1,5 @@ import React from 'react' -import { Route } from 'react-router-dom' +import { Route, Switch } from 'react-router-dom' import App from 'pubsweet-component-xpub-app/src/components' @@ -18,26 +18,28 @@ import NotFound from 'pubsweet-components-faraday/src/components/UIComponents/No const Routes = () => ( <App> - <Route component={LoginPage} exact path="/login" /> - <Route component={SignupPage} exact path="/signup" /> - <PrivateRoute component={DashboardPage} exact path="/" /> - <PrivateRoute - component={ConfirmationPage} - exact - path="/confirmation-page" - /> - <PrivateRoute component={LogoutPage} exact path="/logout" /> - <PrivateRoute - component={WizardPage} - exact - path="/projects/:project/versions/:version/submit" - /> - <PrivateRoute - component={ManuscriptPage} - exact - path="/projects/:project/versions/:version/manuscript" - /> - <Route component={NotFound} path="*" /> + <Switch> + <Route component={LoginPage} exact path="/login" /> + <Route component={SignupPage} exact path="/signup" /> + <PrivateRoute component={DashboardPage} exact path="/" /> + <PrivateRoute + component={ConfirmationPage} + exact + path="/confirmation-page" + /> + <PrivateRoute component={LogoutPage} exact path="/logout" /> + <PrivateRoute + component={WizardPage} + exact + path="/projects/:project/versions/:version/submit" + /> + <PrivateRoute + component={ManuscriptPage} + exact + path="/projects/:project/versions/:version/manuscript" + /> + <Route component={NotFound} /> + </Switch> </App> )