chore(client): remove holiday donation banner (#44742)
Co-authored-by: ahmad abdolsaheb <home@mac-16.local>
This commit is contained in:
@ -293,8 +293,6 @@
|
|||||||
},
|
},
|
||||||
"help-translate": "We are still translating the following certifications.",
|
"help-translate": "We are still translating the following certifications.",
|
||||||
"help-translate-link": "Help us translate.",
|
"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"
|
"project-preview-title": "Here's a preview of what you will build"
|
||||||
},
|
},
|
||||||
"donate": {
|
"donate": {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { Alert } from '@freecodecamp/react-bootstrap';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Trans, useTranslation } from 'react-i18next';
|
import { Trans, useTranslation } from 'react-i18next';
|
||||||
import { randomQuote } from '../../utils/get-words';
|
import { randomQuote } from '../../utils/get-words';
|
||||||
@ -16,7 +15,6 @@ interface IntroProps {
|
|||||||
pending?: boolean;
|
pending?: boolean;
|
||||||
slug?: string;
|
slug?: string;
|
||||||
username?: string;
|
username?: string;
|
||||||
onAlertClick?: () => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Intro = ({
|
const Intro = ({
|
||||||
@ -25,8 +23,7 @@ const Intro = ({
|
|||||||
pending,
|
pending,
|
||||||
complete,
|
complete,
|
||||||
completedChallengeCount,
|
completedChallengeCount,
|
||||||
slug,
|
slug
|
||||||
onAlertClick
|
|
||||||
}: IntroProps): JSX.Element => {
|
}: IntroProps): JSX.Element => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
if (pending && !complete) {
|
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 {
|
} else {
|
||||||
|
@ -603,20 +603,6 @@ blockquote .small {
|
|||||||
border-color: #31708f;
|
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 */
|
/* gatsby 404 */
|
||||||
#search {
|
#search {
|
||||||
background-color: var(--quaternary-background);
|
background-color: var(--quaternary-background);
|
||||||
|
@ -4,7 +4,6 @@ import React from 'react';
|
|||||||
import Helmet from 'react-helmet';
|
import Helmet from 'react-helmet';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { bindActionCreators, Dispatch } from 'redux';
|
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
import Intro from '../components/Intro';
|
import Intro from '../components/Intro';
|
||||||
@ -14,8 +13,7 @@ import LearnLayout from '../components/layouts/learn';
|
|||||||
import {
|
import {
|
||||||
userFetchStateSelector,
|
userFetchStateSelector,
|
||||||
isSignedInSelector,
|
isSignedInSelector,
|
||||||
userSelector,
|
userSelector
|
||||||
executeGA
|
|
||||||
} from '../redux';
|
} from '../redux';
|
||||||
|
|
||||||
interface FetchState {
|
interface FetchState {
|
||||||
@ -57,17 +55,12 @@ interface LearnPageProps {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
executeGA: (payload: Record<string, unknown>) => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch: Dispatch) =>
|
|
||||||
bindActionCreators({ executeGA }, dispatch);
|
|
||||||
|
|
||||||
function LearnPage({
|
function LearnPage({
|
||||||
isSignedIn,
|
isSignedIn,
|
||||||
fetchState: { pending, complete },
|
fetchState: { pending, complete },
|
||||||
user: { name = '', completedChallengeCount = 0 },
|
user: { name = '', completedChallengeCount = 0 },
|
||||||
executeGA,
|
|
||||||
data: {
|
data: {
|
||||||
challengeNode: {
|
challengeNode: {
|
||||||
challenge: {
|
challenge: {
|
||||||
@ -78,16 +71,6 @@ function LearnPage({
|
|||||||
}: LearnPageProps) {
|
}: LearnPageProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const onAlertClick = () => {
|
|
||||||
executeGA({
|
|
||||||
type: 'event',
|
|
||||||
data: {
|
|
||||||
category: 'Donation Related',
|
|
||||||
action: `learn donation alert click`
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LearnLayout>
|
<LearnLayout>
|
||||||
<Helmet title={t('metaTags:title')} />
|
<Helmet title={t('metaTags:title')} />
|
||||||
@ -99,7 +82,6 @@ function LearnPage({
|
|||||||
completedChallengeCount={completedChallengeCount}
|
completedChallengeCount={completedChallengeCount}
|
||||||
isSignedIn={isSignedIn}
|
isSignedIn={isSignedIn}
|
||||||
name={name}
|
name={name}
|
||||||
onAlertClick={onAlertClick}
|
|
||||||
pending={pending}
|
pending={pending}
|
||||||
slug={slug}
|
slug={slug}
|
||||||
/>
|
/>
|
||||||
@ -114,7 +96,7 @@ function LearnPage({
|
|||||||
|
|
||||||
LearnPage.displayName = 'LearnPage';
|
LearnPage.displayName = 'LearnPage';
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(LearnPage);
|
export default connect(mapStateToProps, null)(LearnPage);
|
||||||
|
|
||||||
export const query = graphql`
|
export const query = graphql`
|
||||||
query FirstChallenge {
|
query FirstChallenge {
|
||||||
|
Reference in New Issue
Block a user