rename the "Disable chat" switch to a simple "Chat" (#286)

* change chat config lable

* reverse the chat enable UI

* add reversed to toggle switch props
This commit is contained in:
Meisam
2021-09-11 00:08:15 +02:00
committed by GitHub
parent 718ced0fda
commit 9589c8e11a
3 changed files with 11 additions and 6 deletions

View File

@@ -36,7 +36,7 @@ export default function ConfigChat() {
};
function handleChatDisableChange(disabled: boolean) {
handleFieldChange({ fieldName: 'chatDisabled', value: disabled });
handleFieldChange({ fieldName: 'chatDisabled', value: !disabled });
}
function resetForbiddenUsernameState() {
@@ -95,7 +95,8 @@ export default function ConfigChat() {
<ToggleSwitch
fieldName="chatDisabled"
{...FIELD_PROPS_DISABLE_CHAT}
checked={formDataValues.chatDisabled}
checked={!formDataValues.chatDisabled}
reversed
onChange={handleChatDisableChange}
/>
<TextFieldWithSubmit