implemented navigation within source browser

This commit is contained in:
Sebastian Sdorra
2018-09-28 11:31:38 +02:00
parent 9606a8af29
commit d1a9a1c63a
9 changed files with 233 additions and 59 deletions

View File

@@ -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}
/>
);
}
}