feat(client): update multiple donation modals logic (#54071)

This commit is contained in:
Ahmad Abdolsaheb 2024-03-13 15:16:56 +03:00 committed by GitHub
parent d33e89acb9
commit b4584174cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -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;
}

View File

@ -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;