I have some paths that currently look like this:
const baseUrl = `${mainUrl}/web`;
<Route exact path={baseUrl} component={Goods} />
<Route exact path={`${baseUrl}/:ID`} component={Good} />
<Route exact path={`${baseUrl}/:ID/details`} component={GoodDetails} />
Now, this works all fine, but what I instead want to do is that I want to render Good component, only if the URL matches this ${this.baseUrl}/:ID condition that we have, or if there is a query parameter called br=. I tried to do something like this:
<Route exact path={`${baseUrl}/:ID` | `${mainUrl}?br=:brInfo`} component={Good} />
But, this doesn't seem to work. Any ideas what is the proper way to this with React Router?