Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
X
xpub-elife
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
xpub
xpub-elife
Merge requests
!16
Persist submission form values with apollo-link-state
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Persist submission form values with apollo-link-state
persist-submission-state
into
master
Overview
6
Commits
6
Pipelines
9
Changes
7
Merged
Aanand Prasad
requested to merge
persist-submission-state
into
master
7 years ago
Overview
6
Commits
6
Pipelines
9
Changes
1
Expand
To try it out:
On the dashboard, click "Submit a manuscript"
Fill out the form
Click "Next"
On the file upload dummy page, click "Author details" to return to the form
The values you entered should still be there
Edited
7 years ago
by
Aanand Prasad
1
0
Merge request reports
Viewing commit
1f166e87
Prev
Next
Show latest version
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
1f166e87
refactor: remove premature cleverness
· 1f166e87
Aanand Prasad
authored
7 years ago
app/app.js
+
4
−
4
Options
@@ -3,7 +3,6 @@ import ReactDOM from 'react-dom'
import
{
AppContainer
}
from
'
react-hot-loader
'
import
createHistory
from
'
history/createBrowserHistory
'
import
{
withClientState
}
from
'
apollo-link-state
'
import
{
defaultsDeep
}
from
'
lodash
'
import
{
configureStore
,
Root
}
from
'
pubsweet-client
'
@@ -16,9 +15,10 @@ const history = createHistory()
const
store
=
configureStore
(
history
,
{})
const
makeApolloConfig
=
({
cache
,
link
,
...
config
})
=>
{
const
clientStateLink
=
withClientState
(
defaultsDeep
({
cache
},
AuthorDetailsSchema
.
clientStateConfig
),
)
const
clientStateLink
=
withClientState
({
cache
,
...
AuthorDetailsSchema
.
clientStateConfig
,
})
return
{
cache
,