X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a74d278febca225076a72413a8343e13f5488a58..1fd27a3f5cbf1ac44f2f70e0abcfb7072ed43684:/src/store/side-panel/side-panel-action.ts?ds=sidebyside diff --git a/src/store/side-panel/side-panel-action.ts b/src/store/side-panel/side-panel-action.ts index 28320f96..e4f53cea 100644 --- a/src/store/side-panel/side-panel-action.ts +++ b/src/store/side-panel/side-panel-action.ts @@ -3,9 +3,19 @@ // SPDX-License-Identifier: AGPL-3.0 import { Dispatch } from 'redux'; -import { navigateTo } from '~/store/navigation/navigation-action'; +import { navigateTo } from 'store/navigation/navigation-action'; + +export const sidePanelActions = { + TOGGLE_COLLAPSE: 'TOGGLE_COLLAPSE' +} export const navigateFromSidePanel = (id: string) => (dispatch: Dispatch) => { dispatch(navigateTo(id)); }; + +export const toggleSidePanel = (collapsedState: boolean) => { + return (dispatch) => { + dispatch({type: sidePanelActions.TOGGLE_COLLAPSE, payload: !collapsedState}) + } +} \ No newline at end of file