feat: move admin bar badge section to the bottom of settings

This commit is contained in:
rjchow (aider) 2024-09-15 15:52:00 +10:00 committed by rjchow
parent b016c9364b
commit ac107360ee
No known key found for this signature in database
1 changed files with 20 additions and 20 deletions

View File

@ -163,26 +163,6 @@ const SiteVisibility = () => {
}
) }
</p>
<div className="site-visibility-settings-slotfill-section">
<h3>{ __( 'Admin bar badge', 'woocommerce' ) }</h3>
<ToggleControl
label={ __( 'Hide admin bar badge', 'woocommerce' ) }
help={ __(
'Hide the site visibility badge from the admin bar.',
'woocommerce'
) }
checked={ hideAdminBarBadge === 'yes' }
onChange={ ( checked ) => {
setHideAdminBarBadge( checked ? 'yes' : 'no' );
recordEvent(
'site_visibility_hide_admin_bar_badge_toggle',
{
enabled: checked,
}
);
} }
/>
</div>
<div className="site-visibility-settings-slotfill-section">
<RadioControl
onChange={ () => {
@ -323,6 +303,26 @@ const SiteVisibility = () => {
) }
</p>
</div>
<div className="site-visibility-settings-slotfill-section">
<h3>{ __( 'Admin bar badge', 'woocommerce' ) }</h3>
<ToggleControl
label={ __( 'Hide admin bar badge', 'woocommerce' ) }
help={ __(
'Hide the site visibility badge from the admin bar.',
'woocommerce'
) }
checked={ hideAdminBarBadge === 'yes' }
onChange={ ( checked ) => {
setHideAdminBarBadge( checked ? 'yes' : 'no' );
recordEvent(
'site_visibility_hide_admin_bar_badge_toggle',
{
enabled: checked,
}
);
} }
/>
</div>
{ formRef.current && saveButtonRef.current ? (
<ConfirmationModal
saveButtonRef={ saveButtonRef }