From 595695460da3256554e3651c03ffb49322f0558f Mon Sep 17 00:00:00 2001 From: Lisa Knox Date: Sun, 18 Dec 2022 19:45:34 -0500 Subject: [PATCH] minor cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox --- src/store/side-panel/side-panel-reducer.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/store/side-panel/side-panel-reducer.tsx diff --git a/src/store/side-panel/side-panel-reducer.tsx b/src/store/side-panel/side-panel-reducer.tsx new file mode 100644 index 0000000000..c37d7e5199 --- /dev/null +++ b/src/store/side-panel/side-panel-reducer.tsx @@ -0,0 +1,14 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +import { sidePanelActions } from "./side-panel-action" + +const sidePanelInitialState = { + collapsedState: false +} + +export const sidePanelReducer = (state = sidePanelInitialState, action)=>{ + if(action.type === sidePanelActions.TOGGLE_COLLAPSE) return {...state, collapsedState: action.payload} + return state +} \ No newline at end of file -- 2.39.5