conflicts 13865-repositories
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Wed, 21 Nov 2018 14:32:27 +0000 (15:32 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Wed, 21 Nov 2018 14:32:27 +0000 (15:32 +0100)
Feature #13865

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

1  2 
src/views-components/main-content-bar/main-content-bar.tsx

index 2039f6b8568680579b9ac352277fa022d2819bf2,16fa2a9c21257f72ae9c33ac95a6a5139e975a24..741a7e00f68481b07c24895cbcd5ecf05b8f8290
@@@ -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) =>