1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Dispatch } from 'redux';
6 import { navigateTo } from 'store/navigation/navigation-action';
8 export const sidePanelActions = {
9 TOGGLE_COLLAPSE: 'TOGGLE_COLLAPSE'
12 export const navigateFromSidePanel = (id: string) =>
13 (dispatch: Dispatch) => {
14 dispatch<any>(navigateTo(id));
17 export const toggleSidePanel = (collapsedState: boolean) => {
18 return (dispatch) => {
19 dispatch({type: sidePanelActions.TOGGLE_COLLAPSE, payload: !collapsedState})