about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/home_timeline/components/setting_text.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/features/home_timeline/components/setting_text.js')
-rw-r--r--app/javascript/mastodon/features/home_timeline/components/setting_text.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/app/javascript/mastodon/features/home_timeline/components/setting_text.js b/app/javascript/mastodon/features/home_timeline/components/setting_text.js
index dfa2939b7..a872ae76f 100644
--- a/app/javascript/mastodon/features/home_timeline/components/setting_text.js
+++ b/app/javascript/mastodon/features/home_timeline/components/setting_text.js
@@ -4,12 +4,14 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
 
 class SettingText extends React.PureComponent {
 
-  constructor (props, context) {
-    super(props, context);
-    this.handleChange = this.handleChange.bind(this);
-  }
-
-  handleChange (e) {
+  static propTypes = {
+    settings: ImmutablePropTypes.map.isRequired,
+    settingKey: PropTypes.array.isRequired,
+    label: PropTypes.string.isRequired,
+    onChange: PropTypes.func.isRequired
+  };
+
+  handleChange = (e) => {
     this.props.onChange(this.props.settingKey, e.target.value)
   }
 
@@ -28,11 +30,4 @@ class SettingText extends React.PureComponent {
 
 }
 
-SettingText.propTypes = {
-  settings: ImmutablePropTypes.map.isRequired,
-  settingKey: PropTypes.array.isRequired,
-  label: PropTypes.string.isRequired,
-  onChange: PropTypes.func.isRequired
-};
-
 export default SettingText;