chore(client): remove holiday donation banner (#44742)

Co-authored-by: ahmad abdolsaheb <home@mac-16.local>
This commit is contained in:
Ahmad Abdolsaheb
2022-01-11 12:41:01 +03:00
committed by GitHub
parent 1190ba24fe
commit f30b45955e
4 changed files with 3 additions and 58 deletions

View File

@ -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": {

View File

@ -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 = ({
) : (
''
)}
<Alert bsStyle='info' className='annual-donation-alert'>
<p>
<b>{t('learn.season-greetings-fcc')}</b>
</p>
<p>{t('learn.if-getting-value')}</p>
<hr />
<p className={'text-center'}>
<Link
className='btn'
key='donate'
onClick={onAlertClick}
sameTab={false}
to='/donate'
>
{t('buttons.donate')}
</Link>
</p>
</Alert>
</>
);
} else {

View File

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

View File

@ -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<string, unknown>) => 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 (
<LearnLayout>
<Helmet title={t('metaTags:title')} />
@ -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 {