aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates
diff options
context:
space:
mode:
authorStas Vilchik <stas-vilchik@users.noreply.github.com>2017-04-19 08:51:45 +0200
committerGitHub <noreply@github.com>2017-04-19 08:51:45 +0200
commitd030db77d634090dddc1345ea16b0b2cb0aa3ba2 (patch)
treedf0af8c6587d767e660f7d3925ab6c101fd355ae /server/sonar-web/src/main/js/apps/quality-gates
parent4df60a42ed232f82c6c97c00296c4dbb8ac4398e (diff)
downloadsonarqube-d030db77d634090dddc1345ea16b0b2cb0aa3ba2.tar.gz
sonarqube-d030db77d634090dddc1345ea16b0b2cb0aa3ba2.zip
improve react usage (#1936)
* remove React.createClass * remove react-addons-shallow-compare * convert to functional components * replace Component with PureComponent * remove react-router-redux * declare function components consistently * fix quality flaws * fix typo * declare children prop consistently * pass location to ComponentNavMenu
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js2
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
index 54830da056a..cfd353cc655 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js
@@ -28,7 +28,7 @@ function getKey(condition, index) {
return condition.id ? condition.id : `new-${index}`;
}
-export default class Conditions extends React.Component {
+export default class Conditions extends React.PureComponent {
state = {
error: null
};
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js
index 43e3630fc4e..4b8f6980975 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ThresholdInput.js
@@ -20,7 +20,7 @@
import React from 'react';
import Select from 'react-select';
-export default class ThresholdInput extends React.Component {
+export default class ThresholdInput extends React.PureComponent {
static propTypes = {
name: React.PropTypes.string.isRequired,
value: React.PropTypes.any,