diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-03-17 09:10:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-17 09:10:48 +0100 |
commit | de4365079bad2df3bdee2133576dc913ffbf1ab2 (patch) | |
tree | a522ccb952f0d37f454e8188e13b3dec3f731912 /server/sonar-web/src/main/js/app/utils/startReactApp.js | |
parent | 6a03df65cc0c91a26150ea172a2c480e07326ea1 (diff) | |
download | sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.tar.gz sonarqube-de4365079bad2df3bdee2133576dc913ffbf1ab2.zip |
format code using prettier (#1774)
Diffstat (limited to 'server/sonar-web/src/main/js/app/utils/startReactApp.js')
-rw-r--r-- | server/sonar-web/src/main/js/app/utils/startReactApp.js | 58 |
1 files changed, 37 insertions, 21 deletions
diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.js b/server/sonar-web/src/main/js/app/utils/startReactApp.js index 594e906ff12..71f53ddfe0f 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.js +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.js @@ -69,7 +69,7 @@ import { globalPermissionsRoutes, projectPermissionsRoutes } from '../../apps/pe import getStore from './getStore'; import getHistory from './getHistory'; -function handleUpdate () { +function handleUpdate() { const { action } = this.state.location; if (action === 'PUSH') { @@ -83,14 +83,17 @@ const startReactApp = () => { const history = getHistory(); const store = getStore(); - render(( + render( <Provider store={store}> <Router history={history} onUpdate={handleUpdate}> - <Route path="/dashboard/index/:key" onEnter={(nextState, replace) => { - replace({ pathname: '/dashboard', query: { id: nextState.params.key } }); - }}/> + <Route + path="/dashboard/index/:key" + onEnter={(nextState, replace) => { + replace({ pathname: '/dashboard', query: { id: nextState.params.key } }); + }} + /> - <Route path="markdown/help" component={MarkdownHelp}/> + <Route path="markdown/help" component={MarkdownHelp} /> <Route component={LocalizationContainer}> <Route component={SimpleContainer}> @@ -105,17 +108,20 @@ const startReactApp = () => { <Route path="/" component={App}> - <IndexRoute component={Landing}/> + <IndexRoute component={Landing} /> <Route component={GlobalContainer}> <Route path="about">{aboutRoutes}</Route> <Route path="account">{accountRoutes}</Route> - <Route path="codingrules" onEnter={(nextState, replace) => { - replace('/coding_rules' + window.location.hash); - }}/> + <Route + path="codingrules" + onEnter={(nextState, replace) => { + replace('/coding_rules' + window.location.hash); + }} + /> <Route path="coding_rules">{codingRulesRoutes}</Route> <Route path="component">{componentRoutes}</Route> - <Route path="extension/:pluginKey/:extensionKey" component={GlobalPageExtension}/> + <Route path="extension/:pluginKey/:extensionKey" component={GlobalPageExtension} /> <Route path="issues">{issuesRoutes}</Route> <Route path="organizations">{organizationsRouters}</Route> <Route path="projects">{projectsRoutes}</Route> @@ -129,24 +135,33 @@ const startReactApp = () => { <Route path="component_measures">{componentMeasuresRoutes}</Route> <Route path="custom_measures">{customMeasuresRoutes}</Route> <Route path="dashboard">{overviewRoutes}</Route> - <Redirect from="governance" to="/view"/> + <Redirect from="governance" to="/view" /> <Route path="project"> <Route path="activity">{projectActivityRoutes}</Route> <Route path="admin" component={ProjectAdminContainer}> - <Route path="extension/:pluginKey/:extensionKey" component={ProjectAdminPageExtension}/> + <Route + path="extension/:pluginKey/:extensionKey" + component={ProjectAdminPageExtension} + /> </Route> - <Redirect from="extension/governance/governance" to="/view"/> - <Route path="extension/:pluginKey/:extensionKey" component={ProjectPageExtension}/> + <Redirect from="extension/governance/governance" to="/view" /> + <Route + path="extension/:pluginKey/:extensionKey" + component={ProjectPageExtension} + /> <Route path="background_tasks">{backgroundTasksRoutes}</Route> <Route path="settings">{settingsRoutes}</Route> {projectAdminRoutes} </Route> <Route path="project_roles">{projectPermissionsRoutes}</Route> - <Route path="view" component={ViewDashboard}/> + <Route path="view" component={ViewDashboard} /> </Route> <Route component={AdminContainer}> - <Route path="admin/extension/:pluginKey/:extensionKey" component={GlobalAdminPageExtension}/> + <Route + path="admin/extension/:pluginKey/:extensionKey" + component={GlobalAdminPageExtension} + /> <Route path="background_tasks">{backgroundTasksRoutes}</Route> <Route path="groups">{groupsRoutes}</Route> <Route path="metrics">{metricsRoutes}</Route> @@ -160,14 +175,15 @@ const startReactApp = () => { </Route> </Route> - <Route path="not_found" component={NotFound}/> - <Route path="*" component={NotFound}/> + <Route path="not_found" component={NotFound} /> + <Route path="*" component={NotFound} /> </Route> </Route> </Route> </Router> - </Provider> - ), el); + </Provider>, + el + ); }; export default startReactApp; |