diff --git a/packages/components-faraday/src/components/UIComponents/NotFound.js b/packages/components-faraday/src/components/UIComponents/NotFound.js new file mode 100644 index 0000000000000000000000000000000000000000..e72b54b8bc1fe325a5f336b999676d76b7af9cf6 --- /dev/null +++ b/packages/components-faraday/src/components/UIComponents/NotFound.js @@ -0,0 +1,20 @@ +import React from 'react' +import { Icon } from '@pubsweet/ui' + +const NotFound = ({ history }) => ( + <div style={{ width: '70vw', margin: '0 auto', textAlign: 'center' }}> + <div> + <Icon size={32}>cloud-off</Icon> + </div> + <h2>The page cannot be found</h2> + <h3> + The page you are looking for might have been removed, had its name + changed, or is temporarily unavailable. + </h3> + <a href="#" onClick={history.goBack}> + Back + </a> + </div> +) + +export default NotFound diff --git a/packages/xpub-faraday/app/routes.js b/packages/xpub-faraday/app/routes.js index 453c8be983a916802c53f5f4fb0f9173ec424354..93cd5915e130ce274a307c2692879f5dda483128 100644 --- a/packages/xpub-faraday/app/routes.js +++ b/packages/xpub-faraday/app/routes.js @@ -14,6 +14,7 @@ import DashboardPage from 'pubsweet-component-xpub-dashboard/src/components/Dash import WizardPage from 'pubsweet-component-wizard/src/components/WizardPage' import ManuscriptPage from 'pubsweet-component-xpub-manuscript/src/components/ManuscriptPage' import ConfirmationPage from 'pubsweet-components-faraday/src/components/UIComponents/ConfirmationPage' +import NotFound from 'pubsweet-components-faraday/src/components/UIComponents/NotFound' const Routes = () => ( <App> @@ -36,6 +37,7 @@ const Routes = () => ( exact path="/projects/:project/versions/:version/manuscript" /> + <Route component={NotFound} path="*" /> </App> )