Skip to content

Commit

Permalink
Toggle routes using ConditionalRoute.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abdelsalam committed Aug 23, 2024
1 parent 932ac97 commit baa8c85
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/web/routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {createBrowserHistory} from 'history';
import {stringify, parse} from 'qs';
import qhistory from 'qhistory';

import ConditionalRoute from 'web/components/conditionalRoute/ConditionalRoute';
import LocationObserver from 'web/components/observer/locationobserver';
import SessionObserver from 'web/components/observer/sessionobserver';

Expand Down Expand Up @@ -124,15 +125,18 @@ const Routes = () => (
<Route path="/about" component={AboutPage} />
<Route path="/alerts" component={AlertsPage} />
<Route path="/audits" component={AuditsPage} />
<Route path="/auditreports" component={AuditReportsPage} />
<Route
<ConditionalRoute
path="/auditreports"
component={AuditReportsPage}
feature="COMPLIANCE_REPORTS"/>
<ConditionalRoute
path="/auditreport/delta/:id/:deltaid"
component={DeltaAuditReportDetailsPage}
/>
<Route
feature="COMPLIANCE_REPORTS"/>
<ConditionalRoute
path="/auditreport/:id"
component={AuditReportDetailsPage}
/>
feature="COMPLIANCE_REPORTS"/>
<Route path="/certbunds" component={CertBundsPage} />
<Route path="/cpes" component={CpesPage} />
<Route path="/credentials" component={CredentialsPage} />
Expand Down

0 comments on commit baa8c85

Please sign in to comment.