Skip to content

Commit

Permalink
feat(client): testing donation alert title (freeCodeCamp#44438)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmaxed authored Dec 9, 2021
1 parent dd8f5d0 commit 69639bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions client/i18n/locales/english/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@
"help-translate": "We are still translating the following certifications.",
"help-translate-link": "Help us translate.",
"season-greetings": "Season's Greetings to you and your family.",
"season-greetings-fcc": "Season's Greetings from the freeCodeCamp community 🎉",
"if-getting-value": "If you're getting a lot out of freeCodeCamp, now is a great time to donate to support our nonprofit's mission.",
"project-preview-title": "Here's a preview of what you will build"
},
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/Intro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ const Intro = ({
onAlertClick
}: IntroProps): JSX.Element => {
const { t } = useTranslation();
const buttonVariation = (email: string | undefined): string => {
const titleVariation = (email: string | undefined): string => {
if (!email || emailToABVariant(email).isAVariant)
return t('buttons.donate');
return t('buttons.support-our-nonprofit');
return t('learn.season-greetings');
return t('learn.season-greetings-fcc');
};
if (pending && !complete) {
return (
Expand Down Expand Up @@ -80,7 +80,7 @@ const Intro = ({
)}
<Alert bsStyle='info' className='annual-donation-alert'>
<p>
<b>{t('learn.season-greetings')}</b>
<b>{titleVariation(email)}</b>
</p>
<p>{t('learn.if-getting-value')}</p>
<hr />
Expand All @@ -92,7 +92,7 @@ const Intro = ({
sameTab={false}
to='/donate'
>
{buttonVariation(email)}
{t('buttons.support-our-nonprofit')}
</Link>
</p>
</Alert>
Expand Down
2 changes: 1 addition & 1 deletion config/donation-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const patreonDefaultPledgeAmount = 500;

const aBTestConfig = {
isTesting: true,
type: 'LearnAlertCTA'
type: 'LearnAlertTitle'
};

module.exports = {
Expand Down

0 comments on commit 69639bd

Please sign in to comment.