From f30b45955ea597a10ba79787766aaeaca02a290b Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Tue, 11 Jan 2022 12:41:01 +0300 Subject: [PATCH] chore(client): remove holiday donation banner (#44742) Co-authored-by: ahmad abdolsaheb --- client/i18n/locales/english/translations.json | 2 -- client/src/components/Intro/index.tsx | 23 +------------------ client/src/components/layouts/global.css | 14 ----------- client/src/pages/learn.tsx | 22 ++---------------- 4 files changed, 3 insertions(+), 58 deletions(-) diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index 41ef88ed71..bbc9d52ee3 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -293,8 +293,6 @@ }, "help-translate": "We are still translating the following certifications.", "help-translate-link": "Help us translate.", - "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" }, "donate": { diff --git a/client/src/components/Intro/index.tsx b/client/src/components/Intro/index.tsx index f42f7c580d..764f54aa23 100644 --- a/client/src/components/Intro/index.tsx +++ b/client/src/components/Intro/index.tsx @@ -1,4 +1,3 @@ -import { Alert } from '@freecodecamp/react-bootstrap'; import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { randomQuote } from '../../utils/get-words'; @@ -16,7 +15,6 @@ interface IntroProps { pending?: boolean; slug?: string; username?: string; - onAlertClick?: () => void; } const Intro = ({ @@ -25,8 +23,7 @@ const Intro = ({ pending, complete, completedChallengeCount, - slug, - onAlertClick + slug }: IntroProps): JSX.Element => { const { t } = useTranslation(); if (pending && !complete) { @@ -70,24 +67,6 @@ const Intro = ({ ) : ( '' )} - -

- {t('learn.season-greetings-fcc')} -

-

{t('learn.if-getting-value')}

-
-

- - {t('buttons.donate')} - -

-
); } else { diff --git a/client/src/components/layouts/global.css b/client/src/components/layouts/global.css index 72b546c489..13781e11bd 100644 --- a/client/src/components/layouts/global.css +++ b/client/src/components/layouts/global.css @@ -603,20 +603,6 @@ blockquote .small { border-color: #31708f; } -.annual-donation-alert { - background: linear-gradient( - -10deg, - rgba(217, 237, 247, 1) 35%, - rgba(237, 202, 216, 0) 75%, - rgb(255 215 224) 100% - ), - radial-gradient( - circle, - rgba(255, 202, 225, 1) 0%, - rgba(218, 234, 252, 1) 100% - ); -} - /* gatsby 404 */ #search { background-color: var(--quaternary-background); diff --git a/client/src/pages/learn.tsx b/client/src/pages/learn.tsx index 17466eac26..6cc089fc38 100644 --- a/client/src/pages/learn.tsx +++ b/client/src/pages/learn.tsx @@ -4,7 +4,6 @@ import React from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; -import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; import Intro from '../components/Intro'; @@ -14,8 +13,7 @@ import LearnLayout from '../components/layouts/learn'; import { userFetchStateSelector, isSignedInSelector, - userSelector, - executeGA + userSelector } from '../redux'; interface FetchState { @@ -57,17 +55,12 @@ interface LearnPageProps { }; }; }; - executeGA: (payload: Record) => void; } -const mapDispatchToProps = (dispatch: Dispatch) => - bindActionCreators({ executeGA }, dispatch); - function LearnPage({ isSignedIn, fetchState: { pending, complete }, user: { name = '', completedChallengeCount = 0 }, - executeGA, data: { challengeNode: { challenge: { @@ -78,16 +71,6 @@ function LearnPage({ }: LearnPageProps) { const { t } = useTranslation(); - const onAlertClick = () => { - executeGA({ - type: 'event', - data: { - category: 'Donation Related', - action: `learn donation alert click` - } - }); - }; - return ( @@ -99,7 +82,6 @@ function LearnPage({ completedChallengeCount={completedChallengeCount} isSignedIn={isSignedIn} name={name} - onAlertClick={onAlertClick} pending={pending} slug={slug} /> @@ -114,7 +96,7 @@ function LearnPage({ LearnPage.displayName = 'LearnPage'; -export default connect(mapStateToProps, mapDispatchToProps)(LearnPage); +export default connect(mapStateToProps, null)(LearnPage); export const query = graphql` query FirstChallenge {