mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-16 21:06:35 +08:00
feat(client): update multiple donation modals logic (#54071)
This commit is contained in:
parent
d33e89acb9
commit
b4584174cb
@ -94,7 +94,7 @@ const LearnAlert = ({
|
||||
);
|
||||
|
||||
if (!isDonating) {
|
||||
if (createUniversityFlag) return universityAlert;
|
||||
if (createUniversityFlag.on) return universityAlert;
|
||||
if (progressAlertFlag2024.on) return progressAlert2024;
|
||||
if (seasonalAlertFlag.on) return seasonalAlertFlagAlert;
|
||||
}
|
||||
|
||||
@ -52,13 +52,12 @@ export const shouldRequestDonationSelector = state => {
|
||||
|
||||
/*
|
||||
When AB testing for showing multiple progress modals is active,
|
||||
show a donation modal every 30 challenges after the first 50
|
||||
show a donation modal every 20 challenge
|
||||
*/
|
||||
if (
|
||||
showMultipleProgressModals &&
|
||||
progressDonationModalShown &&
|
||||
completedChallengesLength > 50 &&
|
||||
completionCount - lastCompletionCount >= 30
|
||||
completionCount - lastCompletionCount >= 20
|
||||
)
|
||||
return true;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user