From: Pawel Kowalczyk Date: Wed, 21 Nov 2018 14:32:27 +0000 (+0100) Subject: conflicts X-Git-Tag: 1.3.0~19^2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/dab7bbaf5fdee0e4e56c0bbfe14da5ad42b5869d conflicts Feature #13865 Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk --- dab7bbaf5fdee0e4e56c0bbfe14da5ad42b5869d diff --cc src/views-components/main-content-bar/main-content-bar.tsx index 2039f6b8,16fa2a9c..741a7e00 --- a/src/views-components/main-content-bar/main-content-bar.tsx +++ b/src/views-components/main-content-bar/main-content-bar.tsx @@@ -8,7 -8,7 +8,7 @@@ import { DetailsIcon } from "~/componen import { Breadcrumbs } from "~/views-components/breadcrumbs/breadcrumbs"; import { connect } from 'react-redux'; import { RootState } from '~/store/store'; - import { matchWorkflowRoute, matchRepositoriesRoute } from '~/routes/routes'; -import { matchWorkflowRoute, matchSshKeysRoute } from '~/routes/routes'; ++import { matchWorkflowRoute, matchSshKeysRoute, matchRepositoriesRoute } from '~/routes/routes'; import { toggleDetailsPanel } from '~/store/details-panel/details-panel-action'; interface MainContentBarProps { @@@ -22,14 -22,14 +22,20 @@@ const isWorkflowPath = ({ router }: Roo return !!match; }; +const isRepositoriesPath = ({ router }: RootState) => { + const pathname = router.location ? router.location.pathname : ''; + const match = matchRepositoriesRoute(pathname); + return !!match; +}; + + const isSshKeysPath = ({ router }: RootState) => { + const pathname = router.location ? router.location.pathname : ''; + const match = matchSshKeysRoute(pathname); + return !!match; + }; + export const MainContentBar = connect((state: RootState) => ({ - buttonVisible: !isWorkflowPath(state) && !isRepositoriesPath(state) - buttonVisible: !isWorkflowPath(state) && !isSshKeysPath(state) ++ buttonVisible: !isWorkflowPath(state) && !isSshKeysPath(state) && !isRepositoriesPath(state) }), { onDetailsPanelToggle: toggleDetailsPanel })((props: MainContentBarProps) =>