I'm trying to write a route that uses a dynamic path and then add an additional parameter after that. The problem is it's being ignored and not rendering my component. As an example the following code works.
<Route path={`${SPA_PREFIX}/cases/:caseToken`} component={CaseView} />}
<Route path={`${SPA_PREFIX}/notifications`}><NotificationsView /></Route>
However, the following doesn't work. This will render the CaseView component in the previous example. This should render the <Sars /> component, but it gets ignored.
Update:
{caseManagement
&& <Route path={`${SPA_PREFIX}/cases/:caseToken`} exact component={CaseView} />}
{caseManagement
&& <Route path={`${SPA_PREFIX}/cases`}><CasesView /></Route>}
<Route path={`${SPA_PREFIX}/notifications`}><NotificationsView /></Route>
<Route path={`${SPA_PREFIX}/audit`}><AuditView /></Route>
<Route path={`${SPA_PREFIX}/cases/:caseToken/sars`} component={Sars} />
<Route path={`${SPA_PREFIX}/settings`}><SettingsView /></Route>
What am I doing wrong?