I have this route below that loads a dashboard component:
<Route
path={`${match.url}/dashboard`}
render={params => <Dashboard {...params} />}
/>
Now, I want to add an optional parameter that would only be valid if it's being preceded by an additional path (e.g. additional-path/:param). I tried the code below but I'm not getting the value of the optional param:
<Route
path={`${match.url}/dashboard/(filter/:filtername)?`}
render={params => <Dashboard {...params} />}
/>
Could somebody tell me whats wrong with the code below?