Skip to content

Commit c528dea

Browse files
renamed the variable
1 parent 10e0e71 commit c528dea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dotcom-rendering/src/lib/useNewsletterSubscription.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ interface NewsletterSubscriptionResponse {
1515
*
1616
* @param newsletterId
1717
* @param idApiUrl
18-
* @param enableCheck - Feature flag to enable/disable subscription check. When false, returns false immediately.
18+
* @param shouldCheckSubscription - Feature flag to enable/disable subscription check. When false, returns false immediately.
1919
*/
2020
export const useNewsletterSubscription = (
2121
newsletterId: number,
2222
idApiUrl: string | undefined,
23-
enableCheck: boolean = true,
23+
shouldCheckSubscription: boolean = true,
2424
): boolean | undefined => {
2525
const [isSubscribed, setIsSubscribed] = useState<boolean | undefined>(
2626
undefined,
@@ -30,7 +30,7 @@ export const useNewsletterSubscription = (
3030

3131
useEffect(() => {
3232
// Feature flag is disabled - skip subscription check
33-
if (!enableCheck) {
33+
if (!shouldCheckSubscription) {
3434
setIsSubscribed(false);
3535
return;
3636
}
@@ -99,7 +99,7 @@ export const useNewsletterSubscription = (
9999
};
100100

101101
void fetchNewsletters();
102-
}, [authStatus, newsletterId, idApiUrl, enableCheck]);
102+
}, [authStatus, newsletterId, idApiUrl, shouldCheckSubscription]);
103103

104104
return isSubscribed;
105105
};

0 commit comments

Comments
 (0)