I have a path as
 <Route path="/account/:accountid/LoginPage"
      component={LoginPage}/>
This works fine if the url is -> /account/12332/LoginPage. I want to have optional query parameters. Url structure would be something as
/account/12322/LoginPage?User=A&User=B
I have modified the path as
<Route path="/account/:accountid/LoginPage(/:User)"
      component={LoginPage}/>
after this if I try to access the url it does not redirect me to the appropriate page instead it throws an error as
useBasename.js:56 Uncaught TypeError: history.getCurrentLocation is not a function
    at Object.getCurrentLocation (useBasename.js:56)
    at Object.getCurrentLocation (useQueries.js:64)
    at Object.listen (createTransitionManager.js:246)
    at Object.componentWillMount (Router.js:97)
    at ReactCompositeComponent.js:347
    at measureLifeCyclePerf (ReactCompositeComponent.js:75)
    at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:346)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:257)
    at Object.mountComponent (ReactReconciler.js:45)
    at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:370)
 
     
    