diff --git a/client/src/components/layouts/learn.tsx b/client/src/components/layouts/learn.tsx
index 72e1d1b36aefd9..68478145ae225f 100644
--- a/client/src/components/layouts/learn.tsx
+++ b/client/src/components/layouts/learn.tsx
@@ -6,10 +6,8 @@ import { Loader } from '../../components/helpers';
import {
userSelector,
userFetchStateSelector,
- isSignedInSelector,
- tryToShowDonationModal
+ isSignedInSelector
} from '../../redux';
-import DonateModal from '../Donation/donation-modal';
import './prism.css';
import './prism-night.css';
@@ -37,28 +35,16 @@ const mapStateToProps = createSelector(
})
);
-const mapDispatchToProps = {
- tryToShowDonationModal
-};
+const mapDispatchToProps = {};
type LearnLayoutProps = {
isSignedIn?: boolean;
fetchState: FetchState;
user: User;
- tryToShowDonationModal: () => void;
children?: React.ReactNode;
};
-function LearnLayout({
- fetchState,
- tryToShowDonationModal,
- children
-}: LearnLayoutProps): JSX.Element {
- useEffect(() => {
- tryToShowDonationModal();
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
+function LearnLayout({ fetchState, children }: LearnLayoutProps): JSX.Element {
useEffect(() => {
return () => {
const metaTag = document.querySelector(`meta[name="robots"]`);
@@ -78,9 +64,6 @@ function LearnLayout({
{children}
- {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
- /* @ts-ignore */}
-
>
);
}
diff --git a/client/src/redux/action-types.js b/client/src/redux/action-types.js
index 2d37584c938c94..833dd101dbab3f 100644
--- a/client/src/redux/action-types.js
+++ b/client/src/redux/action-types.js
@@ -6,7 +6,6 @@ export const actionTypes = createTypes(
[
'appMount',
'hardGoTo',
- 'allowBlockDonationRequests',
'closeDonationModal',
'hideCodeAlly',
'preventBlockDonationRequests',
@@ -16,7 +15,6 @@ export const actionTypes = createTypes(
'serverStatusChange',
'resetUserData',
'tryToShowCodeAlly',
- 'tryToShowDonationModal',
'executeGA',
'showCodeAlly',
'submitComplete',
diff --git a/client/src/redux/index.js b/client/src/redux/index.js
index d9e0f582ab8fae..2ef07d287b4982 100644
--- a/client/src/redux/index.js
+++ b/client/src/redux/index.js
@@ -10,7 +10,6 @@ import { createAcceptTermsSaga } from './accept-terms-saga';
import { actionTypes } from './action-types';
import { createAppMountSaga } from './app-mount-saga';
import { createCodeAllySaga } from './codeally-saga';
-import { createDonationSaga } from './donation-saga';
import failedUpdatesEpic from './failed-updates-epic';
import { createFetchUserSaga } from './fetch-user-saga';
import { createGaSaga } from './ga-saga';
@@ -76,7 +75,6 @@ export const sagas = [
...createAcceptTermsSaga(actionTypes),
...createAppMountSaga(actionTypes),
...createCodeAllySaga(actionTypes),
- ...createDonationSaga(actionTypes),
...createGaSaga(actionTypes),
...createFetchUserSaga(actionTypes),
...createShowCertSaga(actionTypes),
@@ -87,15 +85,8 @@ export const sagas = [
export const appMount = createAction(actionTypes.appMount);
-export const tryToShowDonationModal = createAction(
- actionTypes.tryToShowDonationModal
-);
-
export const executeGA = createAction(actionTypes.executeGA);
-export const allowBlockDonationRequests = createAction(
- actionTypes.allowBlockDonationRequests
-);
export const closeDonationModal = createAction(actionTypes.closeDonationModal);
export const openDonationModal = createAction(actionTypes.openDonationModal);
export const preventBlockDonationRequests = createAction(
@@ -444,12 +435,6 @@ export const reducer = handleActions(
}
};
},
- [actionTypes.allowBlockDonationRequests]: (state, { payload }) => {
- return {
- ...state,
- recentlyClaimedBlock: payload
- };
- },
[actionTypes.updateDonationFormState]: (state, { payload }) => ({
...state,
donationFormState: { ...state.donationFormState, ...payload }
diff --git a/client/src/templates/Challenges/components/completion-modal.tsx b/client/src/templates/Challenges/components/completion-modal.tsx
index c86ee9e194fbd2..f8693f9b989988 100644
--- a/client/src/templates/Challenges/components/completion-modal.tsx
+++ b/client/src/templates/Challenges/components/completion-modal.tsx
@@ -12,11 +12,7 @@ import { createSelector } from 'reselect';
import { dasherize } from '../../../../../utils/slugs';
import { isProject } from '../../../../utils/challenge-types';
import Login from '../../../components/Header/components/Login';
-import {
- isSignedInSelector,
- executeGA,
- allowBlockDonationRequests
-} from '../../../redux';
+import { isSignedInSelector, executeGA } from '../../../redux';
import { AllChallengeNode, ChallengeFiles } from '../../../redux/prop-types';
import {
@@ -68,9 +64,6 @@ const mapDispatchToProps = function (dispatch: Dispatch) {
submitChallenge: () => {
dispatch(submitChallenge());
},
- allowBlockDonationRequests: (block: string) => {
- dispatch(allowBlockDonationRequests(block));
- },
executeGA
};
return () => dispatchers;
@@ -97,7 +90,6 @@ export function getCompletedPercent(
}
interface CompletionModalsProps {
- allowBlockDonationRequests: (arg0: string) => void;
block: string;
blockName: string;
certification: string;
@@ -187,17 +179,6 @@ export class CompletionModalInner extends Component<
handleSubmit(): void {
this.props.submitChallenge();
- this.checkBlockCompletion();
- }
-
- // check block completion for donation
- checkBlockCompletion(): void {
- if (
- this.state.completedPercent === 100 &&
- !this.props.completedChallengesIds.includes(this.props.id)
- ) {
- this.props.allowBlockDonationRequests(this.props.blockName);
- }
}
componentWillUnmount(): void {
diff --git a/client/src/templates/Challenges/components/tool-panel.tsx b/client/src/templates/Challenges/components/tool-panel.tsx
index 01b474408de873..0ed4c8a6e16426 100644
--- a/client/src/templates/Challenges/components/tool-panel.tsx
+++ b/client/src/templates/Challenges/components/tool-panel.tsx
@@ -1,6 +1,4 @@
-import {
- Button,
-} from '@freecodecamp/react-bootstrap';
+import { Button } from '@freecodecamp/react-bootstrap';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
diff --git a/client/src/templates/Introduction/super-block-intro.tsx b/client/src/templates/Introduction/super-block-intro.tsx
index 00c1dee08abac7..468ff56b05282a 100644
--- a/client/src/templates/Introduction/super-block-intro.tsx
+++ b/client/src/templates/Introduction/super-block-intro.tsx
@@ -11,7 +11,6 @@ import { bindActionCreators, Dispatch } from 'redux';
import { createSelector } from 'reselect';
import { SuperBlocks } from '../../../../config/certification-settings';
-import DonateModal from '../../components/Donation/donation-modal';
import Login from '../../components/Header/components/Login';
import Map from '../../components/Map';
import { Spacer } from '../../components/helpers';
@@ -20,7 +19,6 @@ import {
userFetchStateSelector,
signInLoadingSelector,
isSignedInSelector,
- tryToShowDonationModal,
userSelector
} from '../../redux';
import { MarkdownRemark, AllChallengeNode, User } from '../../redux/prop-types';
@@ -54,7 +52,6 @@ type SuperBlockProp = {
resetExpansion: () => void;
t: TFunction;
toggleBlock: (arg0: string) => void;
- tryToShowDonationModal: () => void;
user: User;
};
@@ -86,7 +83,6 @@ const mapStateToProps = (state: Record) => {
const mapDispatchToProps = (dispatch: Dispatch) =>
bindActionCreators(
{
- tryToShowDonationModal,
resetExpansion,
toggleBlock: b => toggleBlock(b)
},
@@ -96,7 +92,6 @@ const mapDispatchToProps = (dispatch: Dispatch) =>
const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
useEffect(() => {
initializeExpandedState();
- props.tryToShowDonationModal();
setTimeout(() => {
configureAnchors({ offset: -40, scrollDuration: 400 });
@@ -245,7 +240,6 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
-
>
);
};