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

This commit is contained in:
Ahmad Abdolsaheb
2024-03-13 13:16:56 +01:00
committed by GitHub
parent d33e89acb9
commit b4584174cb
2 changed files with 3 additions and 4 deletions
+1 -1
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;
}
+2 -3
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;