Skip to content

Commit

Permalink
[fix] replace stats navlink with div that opens the page using intern…
Browse files Browse the repository at this point in the history
…al routing tools; remove /statistics from routes
  • Loading branch information
shellyear committed May 16, 2024
1 parent b48454e commit dc24b5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 3 additions & 8 deletions src/components/MainView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,10 @@ class MainView extends React.Component {
</NavItem>
</IfGranted>
<IfGranted expected={ROLE.ADMIN} actual={user.role}>
<NavItem>
<NavLink
className="nav-link"
onClick={() => this.showStatistics()}
isActive={() => path.startsWith(Routes.statistics.path)}
to={Routes.statistics.path}
>
<NavItem style={{ cursor: "pointer" }}>
<div className="nav-link" onClick={() => this.showStatistics()}>
{this.i18n("statistics.panel-title")}
</NavLink>
</div>
</NavItem>
</IfGranted>
<IfGranted expected={ROLE.ADMIN} actual={user.role}>
Expand Down
1 change: 0 additions & 1 deletion src/utils/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const authRoutes = (
<Route exact path={Routes.createUser.path} component={requireAuth(UserController)} />
<Route exact path={Routes.editUser.path} component={requireAuth(UserController)} />
<Route exact path={Routes.passwordChange.path} component={requireAuth(PasswordChangeController)} />
<Route exact path={Routes.statistics.path} component={requireAuth(StatisticsMock)} />
<Route exact path={Routes.institutions.path} component={requireAuth(InstitutionsController)} />
<Route exact path={Routes.createInstitution.path} component={requireAuth(InstitutionController)} />
<Route exact path={Routes.editInstitution.path} component={requireAuth(InstitutionController)} />
Expand Down

0 comments on commit dc24b5b

Please sign in to comment.