Skip to content

Commit

Permalink
Implement the hideToggle logic for the description
Browse files Browse the repository at this point in the history
  • Loading branch information
pablinos committed Feb 21, 2025
1 parent edfacc2 commit e42a2c9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ const SocialModuleToggle: React.FC = () => {
) : null;
};

const hideToggle = is_wpcom || ! currentUserCan( 'manage_modules' );
return (
<ToggleSection
hideToggle={ is_wpcom || ! currentUserCan( 'manage_modules' ) }
hideToggle={ hideToggle }
title={ __(
'Automatically share your posts to social networks',
'jetpack-publicize-components'
Expand All @@ -93,7 +94,7 @@ const SocialModuleToggle: React.FC = () => {
onChange={ toggleModule }
>
<Text className={ styles.text }>
{ ! is_wpcom
{ ! hideToggle
? _x(
'When enabled, you’ll be able to connect your social media accounts and send a post’s featured image and content to the selected channels with a single click when the post is published.',
'Description of the feature that the toggle enables',
Expand Down

0 comments on commit e42a2c9

Please sign in to comment.