X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8e6af2106e745285c5cda437d5856a99111686f8..925a083d8e82281a6d1de1f1021a88da147e5bac:/src/views-components/side-panel/side-panel.tsx diff --git a/src/views-components/side-panel/side-panel.tsx b/src/views-components/side-panel/side-panel.tsx index 780ecc7f..218b624c 100644 --- a/src/views-components/side-panel/side-panel.tsx +++ b/src/views-components/side-panel/side-panel.tsx @@ -2,17 +2,16 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; -import { ArvadosTheme } from '~/common/custom-theme'; -import { SidePanelTree, SidePanelTreeProps } from '~/views-components/side-panel-tree/side-panel-tree'; -import { compose, Dispatch } from 'redux'; +import { ArvadosTheme } from 'common/custom-theme'; +import { SidePanelTree, SidePanelTreeProps } from 'views-components/side-panel-tree/side-panel-tree'; +import { Dispatch } from 'redux'; import { connect } from 'react-redux'; -import { navigateFromSidePanel } from '../../store/side-panel/side-panel-action'; +import { navigateFromSidePanel } from 'store/side-panel/side-panel-action'; import { Grid } from '@material-ui/core'; -import { SidePanelButton } from '~/views-components/side-panel-button/side-panel-button'; -import { RootState } from '~/store/store'; -import { SidePanelProgress } from '~/views-components/progress/side-panel-progress'; +import { SidePanelButton } from 'views-components/side-panel-button/side-panel-button'; +import { RootState } from 'store/store'; const DRAWER_WITDH = 240; @@ -34,15 +33,15 @@ const mapDispatchToProps = (dispatch: Dispatch): SidePanelTreeProps => ({ } }); -const mapStateToProps = (state: RootState) => ({ - sidePanelProgress: state.progressIndicator.sidePanelProgress.started +const mapStateToProps = ({ router }: RootState) => ({ + currentRoute: router.location ? router.location.pathname : '', }); -export const SidePanel = compose( - withStyles(styles), - connect(mapStateToProps, mapDispatchToProps) -)(({ classes, ...props }: WithStyles & SidePanelTreeProps) => - - - {props.sidePanelProgress ? : } - ); \ No newline at end of file +export const SidePanel = withStyles(styles)( + connect(mapStateToProps, mapDispatchToProps)( + ({ classes, ...props }: WithStyles & SidePanelTreeProps & { currentRoute: string }) => + + + + + ));