mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
implemented navigation within source browser
This commit is contained in:
@@ -7,7 +7,8 @@ type Props = {
|
||||
repository: Repository,
|
||||
to: string,
|
||||
label: string,
|
||||
linkName: string
|
||||
linkName: string,
|
||||
activeOnlyWhenExact: boolean
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -15,13 +16,19 @@ type Props = {
|
||||
*/
|
||||
class RepositoryNavLink extends React.Component<Props> {
|
||||
render() {
|
||||
const { linkName, to, label, repository } = this.props;
|
||||
const { linkName, to, label, repository, activeOnlyWhenExact } = this.props;
|
||||
|
||||
if (!repository._links[linkName]) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <NavLink to={to} label={label} />;
|
||||
return (
|
||||
<NavLink
|
||||
to={to}
|
||||
label={label}
|
||||
activeOnlyWhenExact={activeOnlyWhenExact}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user