Skip to content

Commit 99cb02b

Browse files
feature flag name updated
1 parent d9c6c57 commit 99cb02b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dotcom-rendering/src/components/EmailSignUpWrapper.importable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface EmailSignUpWrapperProps extends EmailSignUpProps {
2626
/** You should only set this to true if the privacy message will be shown elsewhere on the page */
2727
hidePrivacyMessage?: boolean;
2828
/** Feature flag to enable hiding newsletter signup for already subscribed users */
29-
hideNewsletterForSubscribers?: boolean;
29+
hideNewsletterSignupComponentForSubscribers?: boolean;
3030
}
3131

3232
/**
@@ -43,13 +43,13 @@ export const EmailSignUpWrapper = ({
4343
index,
4444
listId,
4545
idApiUrl,
46-
hideNewsletterForSubscribers = false,
46+
hideNewsletterSignupComponentForSubscribers = false,
4747
...emailSignUpProps
4848
}: EmailSignUpWrapperProps) => {
4949
const isSubscribed = useNewsletterSubscription(
5050
listId,
5151
idApiUrl,
52-
hideNewsletterForSubscribers,
52+
hideNewsletterSignupComponentForSubscribers,
5353
);
5454

5555
// Show placeholder while subscription status is being determined

dotcom-rendering/src/components/EmailSignUpWrapper.stories.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,25 @@ export const SignedInNotSubscribed: Story = {
8383

8484
// User is signed in and IS subscribed - component returns null (hidden)
8585
// Note: This story will render nothing as the component returns null when subscribed
86-
// Requires hideNewsletterForSubscribers: true to enable the subscription check
86+
// Requires hideNewsletterSignupComponentForSubscribers: true to enable the subscription check
8787
export const SignedInAlreadySubscribed: Story = {
8888
args: {
8989
hidePrivacyMessage: false,
9090
...defaultArgs,
91-
hideNewsletterForSubscribers: true,
91+
hideNewsletterSignupComponentForSubscribers: true,
9292
},
9393
async beforeEach() {
9494
mocked(useNewsletterSubscription).mockReturnValue(true);
9595
},
9696
};
9797

9898
// Feature flag disabled - always shows signup form regardless of subscription status
99-
// When hideNewsletterForSubscribers is false, the subscription check is skipped
99+
// When hideNewsletterSignupComponentForSubscribers is false, the subscription check is skipped
100100
export const FeatureFlagDisabled: Story = {
101101
args: {
102102
hidePrivacyMessage: false,
103103
...defaultArgs,
104-
hideNewsletterForSubscribers: false,
104+
hideNewsletterSignupComponentForSubscribers: false,
105105
},
106106
async beforeEach() {
107107
// Even though we mock this to return true (subscribed),
@@ -115,7 +115,7 @@ export const FeatureFlagDisabled: Story = {
115115
parameters: {
116116
docs: {
117117
description: {
118-
story: 'When the hideNewsletterForSubscribers feature flag is disabled, the signup form is always shown regardless of subscription status.',
118+
story: 'When the hideNewsletterSignupComponentForSubscribers feature flag is disabled, the signup form is always shown regardless of subscription status.',
119119
},
120120
},
121121
},

dotcom-rendering/src/lib/renderElement.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ export const renderElement = ({
577577
successDescription: element.newsletter.successDescription,
578578
theme: element.newsletter.theme,
579579
idApiUrl: idApiUrl ?? '',
580-
hideNewsletterForSubscribers:
581-
!!switches.hideNewsletterForSubscribers,
580+
hideNewsletterSignupComponentForSubscribers:
581+
!!switches.hideNewsletterSignupComponentForSubscribers,
582582
};
583583
if (isListElement || isTimeline) return null;
584584
return (

0 commit comments

Comments
 (0)