X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e79b7364ea28b6f0719c9adf409ba1217b9ccac8..da61c0b626bfef292175bb0c623213cb1efad63d:/src/views-components/side-panel-button/side-panel-button.tsx diff --git a/src/views-components/side-panel-button/side-panel-button.tsx b/src/views-components/side-panel-button/side-panel-button.tsx index 9ba23267dd..61e72d08fc 100644 --- a/src/views-components/side-panel-button/side-panel-button.tsx +++ b/src/views-components/side-panel-button/side-panel-button.tsx @@ -13,7 +13,6 @@ import { StyleRulesCallback, WithStyles, withStyles, Toolbar, Grid, Button, Menu import { AddIcon, CollectionIcon, ProcessIcon, ProjectIcon } from '~/components/icon/icon'; import { openProjectCreateDialog } from '~/store/projects/project-create-actions'; import { openCollectionCreateDialog } from '~/store/collections/collection-create-actions'; -import { matchProjectRoute } from '~/routes/routes'; import { navigateToRunProcess } from '~/store/navigation/navigation-action'; import { runProcessPanelActions } from '~/store/run-process-panel/run-process-panel-actions'; @@ -36,7 +35,6 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ interface SidePanelDataProps { currentItemId: string; - buttonVisible: boolean; } interface SidePanelState { @@ -50,16 +48,9 @@ const transformOrigin: PopoverOrigin = { horizontal: 0 }; -const isButtonVisible = ({ router }: RootState) => { - const pathname = router.location ? router.location.pathname : ''; - const match = matchProjectRoute(pathname); - return !!match; -}; - export const SidePanelButton = withStyles(styles)( connect((state: RootState) => ({ - currentItemId: getProperty(PROJECT_PANEL_CURRENT_UUID)(state.properties), - buttonVisible: isButtonVisible(state) + currentItemId: getProperty(PROJECT_PANEL_CURRENT_UUID)(state.properties) }))( class extends React.Component { @@ -68,10 +59,10 @@ export const SidePanelButton = withStyles(styles)( }; render() { - const { classes, buttonVisible } = this.props; + const { classes } = this.props; const { anchorEl } = this.state; return - {buttonVisible && +