From b88899ac64f6b2e6d04cdb49f7e89c1ec88ac1ef Mon Sep 17 00:00:00 2001
From: Bogdan Cochior <bogdan.cochior@thinslices.com>
Date: Tue, 23 Jan 2018 11:13:42 +0200
Subject: [PATCH] Fix lint and add route with dummy comp

---
 packages/component-wizard/src/components/WizardFormStep.js | 5 +++--
 .../component-wizard/src/components/WizardStep.local.scss  | 2 +-
 packages/xpub-faraday/app/config/journal/submit-wizard.js  | 1 +
 packages/xpub-faraday/app/routes.js                        | 7 +++++++
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/packages/component-wizard/src/components/WizardFormStep.js b/packages/component-wizard/src/components/WizardFormStep.js
index 3d966e269..4516f0041 100644
--- a/packages/component-wizard/src/components/WizardFormStep.js
+++ b/packages/component-wizard/src/components/WizardFormStep.js
@@ -74,7 +74,7 @@ const onSubmit = (
     project,
     version,
     confirmation,
-    wizard: { confirmationModal, submissionRedirect },
+    wizard: { confirmationModal, submissionRedirect, formSectionKeys },
     toggleConfirmation,
     ...rest
   },
@@ -84,8 +84,9 @@ const onSubmit = (
   } else if (confirmationModal && !confirmation) {
     toggleConfirmation()
   } else {
+    const newValues = pick(values, formSectionKeys)
     submitManuscript(
-      values,
+      newValues,
       dispatch,
       project,
       version,
diff --git a/packages/component-wizard/src/components/WizardStep.local.scss b/packages/component-wizard/src/components/WizardStep.local.scss
index 7a2d35a44..8918f2a98 100644
--- a/packages/component-wizard/src/components/WizardStep.local.scss
+++ b/packages/component-wizard/src/components/WizardStep.local.scss
@@ -41,4 +41,4 @@
   position: fixed;
   right: 0;
   top: 0;
-}
\ No newline at end of file
+}
diff --git a/packages/xpub-faraday/app/config/journal/submit-wizard.js b/packages/xpub-faraday/app/config/journal/submit-wizard.js
index 8a75432e4..93a6a5074 100644
--- a/packages/xpub-faraday/app/config/journal/submit-wizard.js
+++ b/packages/xpub-faraday/app/config/journal/submit-wizard.js
@@ -49,6 +49,7 @@ const uploadFile = input => uploadFileFn(input)
 export default {
   showProgress: true,
   formSectionKeys: ['metadata', 'declarations', 'conflicts', 'notes', 'files'],
+  submissionRedirect: '/confirmation-page',
   dispatchFunctions: [uploadFile],
   steps: [
     {
diff --git a/packages/xpub-faraday/app/routes.js b/packages/xpub-faraday/app/routes.js
index 0faa342e6..bc297cdbf 100644
--- a/packages/xpub-faraday/app/routes.js
+++ b/packages/xpub-faraday/app/routes.js
@@ -15,11 +15,18 @@ import {
 import DashboardPage from 'pubsweet-component-xpub-dashboard/src/components/DashboardPage'
 import WizardPage from 'pubsweet-component-wizard/src/components/WizardPage'
 
+const ConfirmationPage = () => <h1>Confirmation page</h1>
+
 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}
-- 
GitLab