import { Config } from 'common/config';
import { pluginConfig } from 'plugins';
import { MiddlewareListReducer } from 'common/plugintypes';
+import { sidePanelReducer } from './side-panel/side-panel-reducer'
declare global {
interface Window {
return createStore(rootReducer, enhancer);
}
-//TODO: put sidePanel items in separate file and import
-export const toggleSidePanel = (collapsedState: boolean) => {
- return (dispatch) => {
- dispatch({type: 'TOGGLE_COLLAPSE', payload: !collapsedState})
- }
-}
-
-const sidePanelInitialState = {
- collapsedState: false
-}
-
-const sidePanelReducer = (state = sidePanelInitialState, action)=>{
- if(action.type === 'TOGGLE_COLLAPSE') return {...state, collapsedState: action.payload}
- return state
-}
-
const createRootReducer = (services: ServiceRepository) => combineReducers({
auth: authReducer(services),
collectionPanel: collectionPanelReducer,