From bcb0465a50a9a1221426f3c3d0b954dc49b18c72 Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Tue, 30 Nov 2021 18:30:21 +0300 Subject: [PATCH] fix: donation clean up (#44257) * fix: donation clean up * rename file * rename2 --- client/src/client-only-routes/show-certification.tsx | 2 +- .../Donation/{DonateCompletion.tsx => donate-completion.tsx} | 2 -- .../components/Donation/{DonateForm.tsx => donate-form.tsx} | 4 ++-- .../Donation/{DonationModal.tsx => donation-modal.tsx} | 4 +--- ...onationTextComponents.tsx => donation-text-components.tsx} | 0 client/src/components/Donation/{Donation.css => donation.css} | 0 client/src/components/layouts/learn.tsx | 2 +- client/src/pages/donate.tsx | 4 ++-- client/src/templates/Introduction/super-block-intro.tsx | 2 +- 9 files changed, 8 insertions(+), 12 deletions(-) rename client/src/components/Donation/{DonateCompletion.tsx => donate-completion.tsx} (98%) rename client/src/components/Donation/{DonateForm.tsx => donate-form.tsx} (99%) rename client/src/components/Donation/{DonationModal.tsx => donation-modal.tsx} (98%) rename client/src/components/Donation/{DonationTextComponents.tsx => donation-text-components.tsx} (100%) rename client/src/components/Donation/{Donation.css => donation.css} (100%) diff --git a/client/src/client-only-routes/show-certification.tsx b/client/src/client-only-routes/show-certification.tsx index 6e0c743739..fc045d2517 100644 --- a/client/src/client-only-routes/show-certification.tsx +++ b/client/src/client-only-routes/show-certification.tsx @@ -9,7 +9,7 @@ import { createSelector } from 'reselect'; import envData from '../../../config/env.json'; import { langCodes } from '../../../config/i18n/all-langs'; import FreeCodeCampLogo from '../assets/icons/FreeCodeCamp-logo'; -import DonateForm from '../components/Donation/DonateForm'; +import DonateForm from '../components/Donation/donate-form'; import { createFlashMessage } from '../components/Flash/redux'; import { Loader, Spacer } from '../components/helpers'; diff --git a/client/src/components/Donation/DonateCompletion.tsx b/client/src/components/Donation/donate-completion.tsx similarity index 98% rename from client/src/components/Donation/DonateCompletion.tsx rename to client/src/components/Donation/donate-completion.tsx index d3633cf4a2..4886627741 100644 --- a/client/src/components/Donation/DonateCompletion.tsx +++ b/client/src/components/Donation/donate-completion.tsx @@ -3,8 +3,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import Spinner from 'react-spinkit'; -import './Donation.css'; - type DonateCompletionProps = { error: string | null; processing: boolean; diff --git a/client/src/components/Donation/DonateForm.tsx b/client/src/components/Donation/donate-form.tsx similarity index 99% rename from client/src/components/Donation/DonateForm.tsx rename to client/src/components/Donation/donate-form.tsx index 72f2026105..00cb9351ff 100644 --- a/client/src/components/Donation/DonateForm.tsx +++ b/client/src/components/Donation/donate-form.tsx @@ -26,14 +26,14 @@ import { postChargeStripeCard } from '../../redux'; import Spacer from '../helpers/spacer'; -import DonateCompletion from './DonateCompletion'; +import DonateCompletion from './donate-completion'; import PatreonButton from './patreon-button'; import type { AddDonationData } from './paypal-button'; import PaypalButton from './paypal-button'; import StripeCardForm, { HandleAuthentication } from './stripe-card-form'; import WalletsWrapper from './walletsButton'; -import './Donation.css'; +import './donation.css'; const numToCommas = (num: number): string => num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,'); diff --git a/client/src/components/Donation/DonationModal.tsx b/client/src/components/Donation/donation-modal.tsx similarity index 98% rename from client/src/components/Donation/DonationModal.tsx rename to client/src/components/Donation/donation-modal.tsx index e97196469f..66c328b620 100644 --- a/client/src/components/Donation/DonationModal.tsx +++ b/client/src/components/Donation/donation-modal.tsx @@ -19,9 +19,7 @@ import { } from '../../redux'; import { isLocationSuperBlock } from '../../utils/path-parsers'; import { Spacer } from '../helpers'; -import DonateForm from './DonateForm'; - -import './Donation.css'; +import DonateForm from './donate-form'; const mapStateToProps = createSelector( isDonationModalOpenSelector, diff --git a/client/src/components/Donation/DonationTextComponents.tsx b/client/src/components/Donation/donation-text-components.tsx similarity index 100% rename from client/src/components/Donation/DonationTextComponents.tsx rename to client/src/components/Donation/donation-text-components.tsx diff --git a/client/src/components/Donation/Donation.css b/client/src/components/Donation/donation.css similarity index 100% rename from client/src/components/Donation/Donation.css rename to client/src/components/Donation/donation.css diff --git a/client/src/components/layouts/learn.tsx b/client/src/components/layouts/learn.tsx index 525048569c..8f3a01f63c 100644 --- a/client/src/components/layouts/learn.tsx +++ b/client/src/components/layouts/learn.tsx @@ -9,7 +9,7 @@ import { isSignedInSelector, tryToShowDonationModal } from '../../redux'; -import DonateModal from '../Donation/DonationModal'; +import DonateModal from '../Donation/donation-modal'; import createRedirect from '../create-redirect'; import './prism.css'; diff --git a/client/src/pages/donate.tsx b/client/src/pages/donate.tsx index c79fa1209b..196c71c099 100644 --- a/client/src/pages/donate.tsx +++ b/client/src/pages/donate.tsx @@ -8,13 +8,13 @@ import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import DonateForm from '../components/Donation/DonateForm'; +import DonateForm from '../components/Donation/donate-form'; import { DonationText, DonationSupportText, DonationOptionsText, DonationOptionsAlertText -} from '../components/Donation/DonationTextComponents'; +} from '../components/Donation/donation-text-components'; import { Spacer, Loader } from '../components/helpers'; import CampersImage from '../components/landing/components/campers-image'; import { signInLoadingSelector, userSelector, executeGA } from '../redux'; diff --git a/client/src/templates/Introduction/super-block-intro.tsx b/client/src/templates/Introduction/super-block-intro.tsx index d0d8296563..fe412337d4 100644 --- a/client/src/templates/Introduction/super-block-intro.tsx +++ b/client/src/templates/Introduction/super-block-intro.tsx @@ -11,7 +11,7 @@ import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; import { SuperBlocks } from '../../../../config/certification-settings'; -import DonateModal from '../../components/Donation/DonationModal'; +import DonateModal from '../../components/Donation/donation-modal'; import Login from '../../components/Header/components/Login'; import Map from '../../components/Map'; import { Spacer } from '../../components/helpers';