mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
get selectedBranch in state for ExtensionPoint / if no branch is selected use defaultBranch for ExtensionPoint
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
//@flow
|
||||
import React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import type { Branch } from "@scm-manager/ui-types";
|
||||
import injectSheet from "react-jss";
|
||||
import { ExtensionPoint, binder } from "@scm-manager/ui-extensions";
|
||||
import {ButtonGroup} from "./buttons";
|
||||
import classNames from "classnames";
|
||||
|
||||
type Props = {
|
||||
branch: Branch,
|
||||
defaultBranch: Branch,
|
||||
revision: string,
|
||||
path: string,
|
||||
baseUrl: string,
|
||||
branch: string,
|
||||
classes: any
|
||||
};
|
||||
|
||||
@@ -60,7 +62,7 @@ class Breadcrumb extends React.Component<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { classes, baseUrl, revision, path } = this.props;
|
||||
const { classes, baseUrl, branch, defaultBranch, path } = this.props;
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -74,7 +76,7 @@ class Breadcrumb extends React.Component<Props> {
|
||||
<ButtonGroup>
|
||||
<ExtensionPoint
|
||||
name="sourceView.actionbar.right"
|
||||
props={{ baseUrl, revision, path }}
|
||||
props={{ baseUrl, branch: branch ? branch : defaultBranch, path }}
|
||||
renderAll={true}
|
||||
/>
|
||||
</ButtonGroup>
|
||||
|
||||
Reference in New Issue
Block a user