1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { PluginConfig } from 'common/plugintypes';
6 import { Dispatch } from 'redux';
7 import { RootState } from 'store/store';
8 import { SidePanelTreeCategory } from 'store/side-panel-tree/side-panel-tree-actions';
9 import { push } from "react-router-redux";
11 export const register = (pluginConfig: PluginConfig, redirect: string) => {
13 pluginConfig.navigateToHandlers.push((dispatch: Dispatch, getState: () => RootState, uuid: string) => {
14 if (uuid === SidePanelTreeCategory.PROJECTS) {
15 dispatch(push(redirect));