check if currentUrl is branchUrl for extensionPoint

This commit is contained in:
Eduard Heimbuch
2019-09-04 11:52:38 +02:00
parent 38adf6fe6e
commit 790910166f
2 changed files with 4 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import classNames from "classnames";
type Props = {
branch: Branch,
defaultBranch: Branch,
branches: Branch[],
revision: string,
path: string,
baseUrl: string,
@@ -62,7 +63,7 @@ class Breadcrumb extends React.Component<Props> {
}
render() {
const { classes, baseUrl, branch, defaultBranch, path } = this.props;
const { classes, baseUrl, branch, defaultBranch, branches, revision, path } = this.props;
return (
<>
@@ -76,7 +77,7 @@ class Breadcrumb extends React.Component<Props> {
<ButtonGroup>
<ExtensionPoint
name="repos.sources.actionbar"
props={{ baseUrl, branch: branch ? branch : defaultBranch, path }}
props={{ baseUrl, branch: branch ? branch : defaultBranch, path, isBranchUrl: branches && branches.filter(b => b.name === revision).length > 0 }}
renderAll={true}
/>
</ButtonGroup>