mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 14:05:44 +01:00
fix links and routes
This commit is contained in:
@@ -28,13 +28,13 @@ const CodeViewSwitcher: FC<Props> = ({ url }) => {
|
||||
<SmallButton
|
||||
label={t("code.commits")}
|
||||
icon="fa fa-exchange-alt"
|
||||
color={url.includes("/code/changesets/") ? "link is-selected" : undefined}
|
||||
color={url.includes("/code/changesets") ? "link is-selected" : undefined}
|
||||
link={createDestinationUrl("changesets")}
|
||||
/>
|
||||
<SmallButton
|
||||
label={t("code.sources")}
|
||||
icon="fa fa-code"
|
||||
color={url.includes("/code/sources/") ? "link is-selected" : undefined}
|
||||
color={url.includes("/code/sources") ? "link is-selected" : undefined}
|
||||
link={createDestinationUrl("sources")}
|
||||
/>
|
||||
</ButtonAddons>
|
||||
|
||||
@@ -74,7 +74,7 @@ class CodeOverview extends React.Component<Props> {
|
||||
const { repository, baseUrl, branches, error, loading, t } = this.props;
|
||||
const url = baseUrl;
|
||||
|
||||
if (!branches || loading) {
|
||||
if (loading) {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ class RepositoryEntry extends React.Component<Props> {
|
||||
|
||||
renderChangesetsLink = (repository: Repository, repositoryLink: string) => {
|
||||
if (repository._links["changesets"]) {
|
||||
return <RepositoryEntryLink icon="exchange-alt" to={repositoryLink + "/changesets"} />;
|
||||
return <RepositoryEntryLink icon="exchange-alt" to={repositoryLink + "/code/changesets"} />;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
renderSourcesLink = (repository: Repository, repositoryLink: string) => {
|
||||
if (repository._links["sources"]) {
|
||||
return <RepositoryEntryLink icon="code" to={repositoryLink + "/sources"} />;
|
||||
return <RepositoryEntryLink icon="code" to={repositoryLink + "/code/sources"} />;
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user