From 68fc2020867a4e501ebe3c5ec7c9d7211638996c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 31 Aug 2017 09:45:46 +0100 Subject: [PATCH] remove pointless self vars and DRY render method of send custom events Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/dialogs/DevtoolsDialog.js | 49 +++++-------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index 83bb910f..6b553eed 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -66,6 +66,10 @@ class SendCustomEvent extends React.Component { this.setState({ message }); } + _additionalFields() { + return
; + } + render() { if (this.state.message) { return
@@ -78,6 +82,7 @@ class SendCustomEvent extends React.Component { return
+ {this._additionalFields()}
@@ -103,40 +108,14 @@ class SendCustomStateEvent extends SendCustomEvent { this.refs.stateKey.value); } - render() { - if (this.state.message) { - return
-
- {this.state.message} -
- {this._buttons()} -
; - } - + _additionalFields() { return
-
-
- -
-
- -
- -
- -
-
- -
- -
- -
-
-