mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
corrected path link
This commit is contained in:
@@ -5,6 +5,7 @@ import injectSheet from "react-jss";
|
||||
import classNames from "classnames";
|
||||
|
||||
type Props = {
|
||||
revision: string,
|
||||
path: string,
|
||||
baseUrl: string,
|
||||
classes: any
|
||||
@@ -18,7 +19,7 @@ const styles = {
|
||||
|
||||
class Breadcrumb extends React.Component<Props> {
|
||||
render() {
|
||||
const { path, baseUrl, classes } = this.props;
|
||||
const { revision, path, baseUrl, classes } = this.props;
|
||||
|
||||
if (path) {
|
||||
const paths = path.split("/");
|
||||
@@ -31,6 +32,7 @@ class Breadcrumb extends React.Component<Props> {
|
||||
>
|
||||
<ul>
|
||||
{paths.map((path, index) => {
|
||||
const currPath = paths.slice(0, index + 1).join("/");
|
||||
if (paths.length - 1 === index) {
|
||||
return (
|
||||
<li className="is-active" key={index}>
|
||||
@@ -42,7 +44,9 @@ class Breadcrumb extends React.Component<Props> {
|
||||
}
|
||||
return (
|
||||
<li key={index}>
|
||||
<Link to={baseUrl + "/" + path}>{path}</Link>
|
||||
<Link to={baseUrl + "/" + revision + "/" + currPath}>
|
||||
{path}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in New Issue
Block a user