From 2a684ec0a646420d4054a27df578006788fbcce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maren=20S=C3=BCwer?= Date: Thu, 27 Sep 2018 09:59:52 +0200 Subject: [PATCH] activate navLink of history if changesets are shown --- scm-ui/src/repos/containers/RepositoryRoot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scm-ui/src/repos/containers/RepositoryRoot.js b/scm-ui/src/repos/containers/RepositoryRoot.js index e8c9681caf..b4a54ad168 100644 --- a/scm-ui/src/repos/containers/RepositoryRoot.js +++ b/scm-ui/src/repos/containers/RepositoryRoot.js @@ -71,6 +71,11 @@ class RepositoryRoot extends React.Component { this.props.deleteRepo(repository, this.deleted); }; + matchChangeset = (route: any) => { + const url = this.matchedUrl(); + return route.location.pathname.match(`${url}/changeset/`); + }; + render() { const { loading, error, repository, t } = this.props; @@ -127,6 +132,7 @@ class RepositoryRoot extends React.Component { activeOnlyWhenExact={false} to={`${url}/history`} label={t("repository-root.history")} + otherLocation={this.matchChangeset} />