//@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, classes: any }; const styles = { noMargin: { margin: "0" }, flexRow: { display: "flex", flexDirection: "row" }, flexStart: { flex: "1" }, buttonGroup: { alignSelf: "center", paddingRight: "1rem" } }; class Breadcrumb extends React.Component { renderPath() { const { revision, path, baseUrl } = this.props; if (path) { const paths = path.split("/"); const map = paths.map((path, index) => { const currPath = paths.slice(0, index + 1).join("/"); if (paths.length - 1 === index) { return (
  • {path}
  • ); } return (
  • {path}
  • ); }); return map; } return
  • ; } render() { const { classes, baseUrl, branch, defaultBranch, path } = this.props; return ( <>
    { binder.hasExtension("repos.sources.actionbar") &&
    }

    ); } } export default injectSheet(styles)(Breadcrumb);