mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
added slash at the end of the url to correctly link for pagination
This commit is contained in:
@@ -7,12 +7,11 @@ import { binder, ExtensionPoint } from "@scm-manager/ui-extensions";
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
t: string => string,
|
t: string => string,
|
||||||
links: Links,
|
links: Links
|
||||||
};
|
};
|
||||||
|
|
||||||
class PrimaryNavigation extends React.Component<Props> {
|
class PrimaryNavigation extends React.Component<Props> {
|
||||||
|
createNavigationAppender = navigationItems => {
|
||||||
createNavigationAppender = (navigationItems) => {
|
|
||||||
const { t, links } = this.props;
|
const { t, links } = this.props;
|
||||||
|
|
||||||
return (to: string, match: string, label: string, linkName: string) => {
|
return (to: string, match: string, label: string, linkName: string) => {
|
||||||
@@ -24,8 +23,8 @@ class PrimaryNavigation extends React.Component<Props> {
|
|||||||
match={match}
|
match={match}
|
||||||
label={t(label)}
|
label={t(label)}
|
||||||
key={linkName}
|
key={linkName}
|
||||||
/>)
|
/>
|
||||||
;
|
);
|
||||||
navigationItems.push(navigationItem);
|
navigationItems.push(navigationItem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -63,9 +62,19 @@ class PrimaryNavigation extends React.Component<Props> {
|
|||||||
<ExtensionPoint name="primary-navigation.first-menu" props={props} />
|
<ExtensionPoint name="primary-navigation.first-menu" props={props} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
append("/repos", "/(repo|repos)", "primary-navigation.repositories", "repositories");
|
append(
|
||||||
append("/users", "/(user|users)", "primary-navigation.users", "users");
|
"/repos/",
|
||||||
append("/groups", "/(group|groups)", "primary-navigation.groups", "groups");
|
"/(repo|repos)",
|
||||||
|
"primary-navigation.repositories",
|
||||||
|
"repositories"
|
||||||
|
);
|
||||||
|
append("/users/", "/(user|users)", "primary-navigation.users", "users");
|
||||||
|
append(
|
||||||
|
"/groups/",
|
||||||
|
"/(group|groups)",
|
||||||
|
"primary-navigation.groups",
|
||||||
|
"groups"
|
||||||
|
);
|
||||||
append("/config", "/config", "primary-navigation.config", "config");
|
append("/config", "/config", "primary-navigation.config", "config");
|
||||||
|
|
||||||
navigationItems.push(
|
navigationItems.push(
|
||||||
@@ -86,9 +95,7 @@ class PrimaryNavigation extends React.Component<Props> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="tabs is-boxed">
|
<nav className="tabs is-boxed">
|
||||||
<ul>
|
<ul>{navigationItems}</ul>
|
||||||
{navigationItems}
|
|
||||||
</ul>
|
|
||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user