diff --git a/src/commons/application/reducers/RootReducer.ts b/src/commons/application/reducers/RootReducer.ts index 6d44a73187..504bd70c02 100644 --- a/src/commons/application/reducers/RootReducer.ts +++ b/src/commons/application/reducers/RootReducer.ts @@ -7,20 +7,20 @@ import { StoriesReducer as stories } from '../../../features/stories/StoriesRedu import { FileSystemReducer as fileSystem } from '../../fileSystem/FileSystemReducer'; import { SideContentReducer as sideContent } from '../../sideContent/SideContentReducer'; import { WorkspaceReducer as workspaces } from '../../workspace/WorkspaceReducer'; +import { OverallState } from '../ApplicationTypes'; import { RouterReducer as router } from './CommonsReducer'; import { SessionsReducer as session } from './SessionsReducer'; -const createRootReducer = () => - combineReducers({ - router, - achievement, - dashboard, - playground, - session, - stories, - workspaces, - fileSystem, - sideContent - }); +const rootReducer = combineReducers({ + router, + achievement, + dashboard, + playground, + session, + stories, + workspaces, + fileSystem, + sideContent +}); -export default createRootReducer; +export default rootReducer; diff --git a/src/pages/createStore.ts b/src/pages/createStore.ts index 04389b95bb..861cdd543e 100644 --- a/src/pages/createStore.ts +++ b/src/pages/createStore.ts @@ -5,7 +5,7 @@ import createSagaMiddleware from 'redux-saga'; import { SourceActionType } from 'src/commons/utils/ActionsHelper'; import { defaultState, OverallState } from '../commons/application/ApplicationTypes'; -import createRootReducer from '../commons/application/reducers/RootReducer'; +import rootReducer from '../commons/application/reducers/RootReducer'; import MainSaga from '../commons/sagas/MainSaga'; import { generateOctokitInstance } from '../commons/utils/GitHubPersistenceHelper'; import { loadStoredState, SavedState, saveState } from './localStorage'; @@ -21,7 +21,7 @@ export function createStore() { const initialStore = loadStore(loadStoredState()) || defaultState; const createdStore = configureStore({ - reducer: createRootReducer(), + reducer: rootReducer, // Fix for redux-saga type incompatibility // See: https://github.com/reduxjs/redux-toolkit/issues/3950 middleware: middleware as any,