import * as actions from "@nteract/actions" ; import { makeSidebarRecord } from "@nteract/types" ; import { Action , Reducer } from "redux" ; import { combineReducers } from "redux-immutable" ; export const isSidebarVisible = ( state = false , action ) : boolean => { switch ( action . type ) { case actions . TOGGLE_SIDEBAR : return ! state ; default : return state ; } } ; export const sidebar = combineReducers ( { isSidebarVisible } , makeSidebarRecord as any ) ;