]> git.arvados.org - arvados.git/blob - services/workbench2/src/store/side-panel/side-panel-reducer.tsx
22566: Remove now unused currentSideWidth and observer setter
[arvados.git] / services / workbench2 / src / store / side-panel / side-panel-reducer.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { sidePanelActions } from "./side-panel-action"
6
7 interface SidePanelState {
8   collapsedState: boolean,
9 }
10
11 const sidePanelInitialState = {
12   collapsedState: false,
13 }
14
15 export const sidePanelReducer = (state: SidePanelState = sidePanelInitialState, action)=>{
16   if(action.type === sidePanelActions.TOGGLE_COLLAPSE) return {...state, collapsedState: action.payload}
17   return state
18 }