19744: Made the resource usage report button obvious
[arvados.git] / services / workbench2 / src / store / side-panel / side-panel-reducer.tsx
index a6ed03b6ab0a35bffb6cdf9e02e4bd8985d098d1..0d9b1ad3df753b66c84816bd13058df9d17d4db5 100644 (file)
@@ -5,14 +5,17 @@
 import { sidePanelActions } from "./side-panel-action"
 
 interface SidePanelState {
-  collapsedState: boolean
+  collapsedState: boolean,
+  currentSideWidth: number
 }
 
 const sidePanelInitialState = {
-  collapsedState: false
+  collapsedState: false,
+  currentSideWidth: 0
 }
 
 export const sidePanelReducer = (state: SidePanelState = sidePanelInitialState, action)=>{
   if(action.type === sidePanelActions.TOGGLE_COLLAPSE) return {...state, collapsedState: action.payload}
+  if(action.type === sidePanelActions.SET_CURRENT_WIDTH) return {...state, currentSideWidth: action.payload}
   return state
 }
\ No newline at end of file