summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console/custom_emoji_settings.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/admin_console/custom_emoji_settings.jsx')
-rw-r--r--webapp/components/admin_console/custom_emoji_settings.jsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/webapp/components/admin_console/custom_emoji_settings.jsx b/webapp/components/admin_console/custom_emoji_settings.jsx
index 78661e16e..90b70241d 100644
--- a/webapp/components/admin_console/custom_emoji_settings.jsx
+++ b/webapp/components/admin_console/custom_emoji_settings.jsx
@@ -18,11 +18,6 @@ export default class CustomEmojiSettings extends AdminSettings {
this.getConfigFromState = this.getConfigFromState.bind(this);
this.renderSettings = this.renderSettings.bind(this);
-
- this.state = Object.assign(this.state, {
- enableCustomEmoji: props.config.ServiceSettings.EnableCustomEmoji,
- restrictCustomEmojiCreation: props.config.ServiceSettings.RestrictCustomEmojiCreation
- });
}
getConfigFromState(config) {
@@ -35,6 +30,13 @@ export default class CustomEmojiSettings extends AdminSettings {
return config;
}
+ getStateFromConfig(config) {
+ return {
+ enableCustomEmoji: config.ServiceSettings.EnableCustomEmoji,
+ restrictCustomEmojiCreation: config.ServiceSettings.RestrictCustomEmojiCreation
+ };
+ }
+
renderTitle() {
return (
<h3>