From 55e222a9e294dff40ed8136c7ea514bf335cbeb8 Mon Sep 17 00:00:00 2001 From: Syed Ali Abbas Zaidi <88369802+Syed-Ali-Abbas-Zaidi@users.noreply.github.com> Date: Tue, 26 Dec 2023 08:34:03 +0500 Subject: [PATCH] [MM-56019] Move the deactivate account section to the last, and change the button to danger (#25697) * [MM-56019] :art: Move the deactivate account section to the last, and change the button to danger * refactor: remove unnecessary divider --- webapp/channels/src/components/setting_item_max.tsx | 2 ++ .../user_settings/advanced/user_settings_advanced.tsx | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp/channels/src/components/setting_item_max.tsx b/webapp/channels/src/components/setting_item_max.tsx index 1936e77ff7..ddf6e1bdb7 100644 --- a/webapp/channels/src/components/setting_item_max.tsx +++ b/webapp/channels/src/components/setting_item_max.tsx @@ -48,6 +48,7 @@ type Props = { cancelButtonText?: ReactNode; shiftEnter?: boolean; saveButtonText?: string; + saveButtonClassName?: string; } export default class SettingItemMax extends React.PureComponent { settingList: React.RefObject; @@ -170,6 +171,7 @@ export default class SettingItemMax extends React.PureComponent { saving={this.props.saving} disabled={this.props.saving} onClick={this.handleSubmit} + btnClass={this.props.saveButtonClassName} /> ); } diff --git a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx index 91539d0172..14ea42f4c6 100644 --- a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx +++ b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx @@ -819,6 +819,7 @@ export default class AdvancedSettingsDisplay extends React.PureComponent, ]} saveButtonText={'Deactivate'} + saveButtonClassName={'btn-danger'} setting={'deactivateAccount'} submit={this.handleShowDeactivateAccountModal} saving={this.state.isSaving} @@ -942,17 +943,17 @@ export default class AdvancedSettingsDisplay extends React.PureComponent {previewFeaturesSectionDivider} {previewFeaturesSection} - {formattingSectionDivider} - {deactivateAccountSection} {unreadScrollPositionSectionDivider} {unreadScrollPositionSection} {syncDraftsSectionDivider} {syncDraftsSection} + {formattingSectionDivider} + {deactivateAccountSection}
{makeConfirmationModal}