diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/about')
-rw-r--r-- | server/sonar-web/src/main/js/apps/about/components/AboutApp.js | 7 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/about/routes.js | 13 |
2 files changed, 12 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutApp.js b/server/sonar-web/src/main/js/apps/about/components/AboutApp.js index 6efe4c891d0..a0f80af5dca 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutApp.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutApp.js @@ -20,7 +20,7 @@ // @flow import React from 'react'; import { connect } from 'react-redux'; -import keyBy from 'lodash/keyBy'; +import { keyBy } from 'lodash'; import { Link } from 'react-router'; import AboutProjects from './AboutProjects'; import EntryIssueTypes from './EntryIssueTypes'; @@ -43,7 +43,7 @@ type State = { loading: boolean, projectsCount?: number, issueTypes?: { - [key: string]: { + [key: string]: ?{ count: number } } @@ -140,8 +140,7 @@ class AboutApp extends React.Component { <a className="button" href="https://redirect.sonarsource.com/doc/home.html" - target="_blank" - > + target="_blank"> {translate('about_page.read_documentation')} </a> </div> diff --git a/server/sonar-web/src/main/js/apps/about/routes.js b/server/sonar-web/src/main/js/apps/about/routes.js index a8d72cc6e72..13940436e30 100644 --- a/server/sonar-web/src/main/js/apps/about/routes.js +++ b/server/sonar-web/src/main/js/apps/about/routes.js @@ -17,8 +17,13 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import React from 'react'; -import { IndexRoute } from 'react-router'; -import AboutApp from './components/AboutApp'; +const routes = [ + { + getIndexRoute(_, callback) { + require.ensure([], require => + callback(null, { component: require('./components/AboutApp').default })); + } + } +]; -export default <IndexRoute component={AboutApp} />; +export default routes; |