diff options
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/routes.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/routes.js b/server/sonar-web/src/main/js/apps/issues/routes.js index a05f0ec92d2..a7fbd5d5c28 100644 --- a/server/sonar-web/src/main/js/apps/issues/routes.js +++ b/server/sonar-web/src/main/js/apps/issues/routes.js @@ -18,9 +18,14 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import React from 'react'; -import { IndexRoute } from 'react-router'; +import { IndexRoute, Route } from 'react-router'; import IssuesAppContainer from './components/IssuesAppContainer'; -export default ( - <IndexRoute component={IssuesAppContainer}/> -); +const onSearchEnter = (nextState, replace) => { + replace('/issues' + window.location.hash); +}; + +export default [ + <IndexRoute key="index" component={IssuesAppContainer}/>, + <Route key="search" path="search" onEnter={onSearchEnter}/> +]; |