Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
data: scene
}
}
}
return newState
},
onError: (err, store) => {
const isQuotaModalOpen = !!getOpenModals(store.getState())['QuotaExceededModal']
if (err instanceof DOMException && err.name === 'QuotaExceededError' && !isQuotaModalOpen) {
store.dispatch(openModal('QuotaExceededModal'))
}
}
})
const analyticsMiddleware = createAnalyticsMiddleware(env.get('REACT_APP_SEGMENT_API_KEY'))
const middlewares = [historyMiddleware, sagasMiddleware, loggerMiddleware, storageMiddleware, analyticsMiddleware]
const middleware = applyMiddleware(...middlewares)
const enhancer = composeEnhancers(middleware)
const store = createStore(rootReducer, enhancer)
sagasMiddleware.run(rootSaga)
loadStorageMiddleware(store)
export function getState() {
return store.getState()
}
window.onbeforeunload = function() {