Skip to content
Snippets Groups Projects
Commit 1f166e87 authored by Aanand Prasad's avatar Aanand Prasad
Browse files

refactor: remove premature cleverness

parent 6b46b670
No related branches found
No related tags found
1 merge request!16Persist submission form values with apollo-link-state
...@@ -3,7 +3,6 @@ import ReactDOM from 'react-dom' ...@@ -3,7 +3,6 @@ import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader' import { AppContainer } from 'react-hot-loader'
import createHistory from 'history/createBrowserHistory' import createHistory from 'history/createBrowserHistory'
import { withClientState } from 'apollo-link-state' import { withClientState } from 'apollo-link-state'
import { defaultsDeep } from 'lodash'
import { configureStore, Root } from 'pubsweet-client' import { configureStore, Root } from 'pubsweet-client'
...@@ -16,9 +15,10 @@ const history = createHistory() ...@@ -16,9 +15,10 @@ const history = createHistory()
const store = configureStore(history, {}) const store = configureStore(history, {})
const makeApolloConfig = ({ cache, link, ...config }) => { const makeApolloConfig = ({ cache, link, ...config }) => {
const clientStateLink = withClientState( const clientStateLink = withClientState({
defaultsDeep({ cache }, AuthorDetailsSchema.clientStateConfig), cache,
) ...AuthorDetailsSchema.clientStateConfig,
})
return { return {
cache, cache,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment