Fix branches link

Without the trailing '/' further links like 'create' will lead to
illegal links because they will not be appended but will replace the
'branches' part.
This commit is contained in:
René Pfeuffer
2020-11-02 07:40:48 +01:00
parent 68d6d71c71
commit 5f99ece3bb
3 changed files with 6 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Internal server error for git sub modules without tree object ([#1397](https://github.com/scm-manager/scm-manager/pull/1397)) - Internal server error for git sub modules without tree object ([#1397](https://github.com/scm-manager/scm-manager/pull/1397))
- Do not expose subversion commit with id 0 ([#1395](https://github.com/scm-manager/scm-manager/pull/1395)) - Do not expose subversion commit with id 0 ([#1395](https://github.com/scm-manager/scm-manager/pull/1395))
- SVN diff with property changes ([#1400](https://github.com/scm-manager/scm-manager/pull/1400)) - SVN diff with property changes ([#1400](https://github.com/scm-manager/scm-manager/pull/1400))
- Branches link in repository overview ([#1404](https://github.com/scm-manager/scm-manager/pull/1404))
## [2.8.0] - 2020-10-27 ## [2.8.0] - 2020-10-27
### Added ### Added

View File

@@ -50436,7 +50436,7 @@ exports[`Storyshots RepositoryEntry Avatar EP 1`] = `
> >
<a <a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item" className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches" href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]} onClick={[Function]}
> >
<i <i
@@ -50550,7 +50550,7 @@ exports[`Storyshots RepositoryEntry Before Title EP 1`] = `
> >
<a <a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item" className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches" href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]} onClick={[Function]}
> >
<i <i
@@ -50661,7 +50661,7 @@ exports[`Storyshots RepositoryEntry Default 1`] = `
> >
<a <a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item" className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches" href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]} onClick={[Function]}
> >
<i <i
@@ -50772,7 +50772,7 @@ exports[`Storyshots RepositoryEntry Quick Link EP 1`] = `
> >
<a <a
className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item" className="RepositoryEntryLink__PointerEventsLink-sc-1hpqj0w-0 iZuqoP level-item"
href="/repo/hitchhiker/heartOfGold/branches" href="/repo/hitchhiker/heartOfGold/branches/"
onClick={[Function]} onClick={[Function]}
> >
<i <i

View File

@@ -44,7 +44,7 @@ class RepositoryEntry extends React.Component<Props> {
renderBranchesLink = (repository: Repository, repositoryLink: string) => { renderBranchesLink = (repository: Repository, repositoryLink: string) => {
if (repository._links["branches"]) { if (repository._links["branches"]) {
return <RepositoryEntryLink icon="code-branch" to={repositoryLink + "/branches"} />; return <RepositoryEntryLink icon="code-branch" to={repositoryLink + "/branches/"} />;
} }
return null; return null;
}; };