From cff416d7f9910c258bc8d7175c08afff96a9eb2a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 17 Aug 2017 21:39:59 +0200 Subject: SONAR-9702 Build UI for short-lived branches (#2371) --- .../custom-measures/components/CustomMeasuresAppContainer.js | 10 +--------- server/sonar-web/src/main/js/apps/custom-measures/routes.ts | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/custom-measures') diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/CustomMeasuresAppContainer.js b/server/sonar-web/src/main/js/apps/custom-measures/components/CustomMeasuresAppContainer.js index 1f40c41775f..4f2f1ba1ca6 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/components/CustomMeasuresAppContainer.js +++ b/server/sonar-web/src/main/js/apps/custom-measures/components/CustomMeasuresAppContainer.js @@ -19,12 +19,10 @@ */ import React from 'react'; import Helmet from 'react-helmet'; -import { connect } from 'react-redux'; import init from '../init'; -import { getComponent } from '../../../store/rootReducer'; import { translate } from '../../../helpers/l10n'; -class CustomMeasuresAppContainer extends React.PureComponent { +export default class CustomMeasuresAppContainer extends React.PureComponent { componentDidMount() { init(this.refs.container, this.props.component); } @@ -38,9 +36,3 @@ class CustomMeasuresAppContainer extends React.PureComponent { ); } } - -const mapStateToProps = (state, ownProps) => ({ - component: getComponent(state, ownProps.location.query.id) -}); - -export default connect(mapStateToProps)(CustomMeasuresAppContainer); diff --git a/server/sonar-web/src/main/js/apps/custom-measures/routes.ts b/server/sonar-web/src/main/js/apps/custom-measures/routes.ts index ad092ba1d48..cc0a32c95c1 100644 --- a/server/sonar-web/src/main/js/apps/custom-measures/routes.ts +++ b/server/sonar-web/src/main/js/apps/custom-measures/routes.ts @@ -23,7 +23,7 @@ const routes = [ { getIndexRoute(_: RouterState, callback: (err: any, route: IndexRouteProps) => any) { import('./components/CustomMeasuresAppContainer').then(i => - callback(null, { component: i.default }) + callback(null, { component: (i as any).default }) ); } } -- cgit v1.2.3