diff --git a/client/src/client-only-routes/show-certification.tsx b/client/src/client-only-routes/show-certification.tsx index c4b09355294..70c98a60881 100644 --- a/client/src/client-only-routes/show-certification.tsx +++ b/client/src/client-only-routes/show-certification.tsx @@ -5,14 +5,14 @@ import { Trans, useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row, Image, Button } from '@freecodecamp/ui'; +import { Container, Col, Row, Image, Button, Spacer } from '@freecodecamp/ui'; import envData from '../../config/env.json'; import { getLangCode } from '../../../shared/config/i18n'; import FreeCodeCampLogo from '../assets/icons/freecodecamp'; import MicrosoftLogo from '../assets/icons/microsoft-logo'; import { createFlashMessage } from '../components/Flash/redux'; -import { Loader, Spacer } from '../components/helpers'; +import { Loader } from '../components/helpers'; import RedirectHome from '../components/redirect-home'; import { Themes } from '../components/settings/theme'; import { showCert, fetchProfileForUser } from '../redux/actions'; @@ -253,7 +253,7 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { className='donation-section' data-playwright-test-label='donation-section' > - + {!isDonationSubmitted && ( @@ -280,13 +280,13 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { /> - + {isDonationSubmitted && donationCloseBtn} - + ); @@ -308,7 +308,7 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { > {t('profile.add-linkedin')} - + - + ); @@ -484,11 +484,11 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { className='row certificate-links' data-playwright-test-label='cert-links' > - + {signedInUserName === username ? shareCertBtns : ''} - + - + ); diff --git a/client/src/client-only-routes/show-project-links.tsx b/client/src/client-only-routes/show-project-links.tsx index 4c3b9ac3d97..c6a18ddd399 100644 --- a/client/src/client-only-routes/show-project-links.tsx +++ b/client/src/client-only-routes/show-project-links.tsx @@ -2,9 +2,9 @@ import { find } from 'lodash-es'; import React, { useState } from 'react'; import { Trans, useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; -import { Table } from '@freecodecamp/ui'; +import { Table, Spacer } from '@freecodecamp/ui'; -import { Link, Spacer } from '../components/helpers'; +import { Link } from '../components/helpers'; import ProjectModal from '../components/SolutionViewer/project-modal'; import type { CompletedChallenge, User } from '../redux/prop-types'; import { @@ -186,7 +186,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => { return (
{t(getCertHeading(certName), { user: name })} - + @@ -199,7 +199,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => {
- +
- + {t('settings.profile-note')} @@ -165,18 +165,18 @@ export function ShowSettings(props: ShowSettingsProps): JSX.Element { toggleNightMode={toggleNightMode} toggleSoundMode={toggleSoundMode} /> - + - + - + - + {examTokenFlag && } {userToken && ( <> - + )} - +
diff --git a/client/src/client-only-routes/show-unsubscribed.tsx b/client/src/client-only-routes/show-unsubscribed.tsx index db19c7cbc82..eefd5f0db79 100644 --- a/client/src/client-only-routes/show-unsubscribed.tsx +++ b/client/src/client-only-routes/show-unsubscribed.tsx @@ -2,10 +2,9 @@ import type { RouteComponentProps } from '@reach/router'; import React from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; -import { Container, Panel, Button } from '@freecodecamp/ui'; +import { Container, Panel, Button, Spacer } from '@freecodecamp/ui'; import envData from '../../config/env.json'; -import { Spacer } from '../components/helpers'; import FullWidthRow from '../components/helpers/full-width-row'; const { apiLocation } = envData; @@ -26,9 +25,9 @@ function ShowUnsubscribed({
- + - +

{t('misc.unsubscribed')}

@@ -49,7 +48,7 @@ function ShowUnsubscribed({
) : null} - +
diff --git a/client/src/client-only-routes/show-update-email.tsx b/client/src/client-only-routes/show-update-email.tsx index c664e8defd6..3417fe7aaba 100644 --- a/client/src/client-only-routes/show-update-email.tsx +++ b/client/src/client-only-routes/show-update-email.tsx @@ -16,11 +16,12 @@ import { ControlLabel, Col, Row, - Button + Button, + Spacer } from '@freecodecamp/ui'; import envData from '../../config/env.json'; -import { Spacer, Loader, Link } from '../components/helpers'; +import { Loader, Link } from '../components/helpers'; import './show-update-email.css'; import { isSignedInSelector, userSelector } from '../redux/selectors'; import { hardGoTo as navigate } from '../redux/actions'; @@ -87,7 +88,7 @@ function ShowUpdateEmail({ {t('misc.update-email-1')} | freeCodeCamp.org - +

{t('misc.update-email-2')}

diff --git a/client/src/client-only-routes/show-user.tsx b/client/src/client-only-routes/show-user.tsx index c59a2256015..7e0b04be0f4 100644 --- a/client/src/client-only-routes/show-user.tsx +++ b/client/src/client-only-routes/show-user.tsx @@ -11,11 +11,12 @@ import { Panel, Col, Row, - Button + Button, + Spacer } from '@freecodecamp/ui'; import Login from '../components/Header/components/login'; -import { Spacer, Loader, FullWidthRow } from '../components/helpers'; +import { Loader, FullWidthRow } from '../components/helpers'; import { reportUser } from '../redux/actions'; import { userFetchStateSelector, @@ -83,17 +84,17 @@ function ShowUser({ return (
- + {t('report.sign-in')} - + {t('buttons.click-here')} - + @@ -106,7 +107,7 @@ function ShowUser({ {t('report.portfolio')} | freeCodeCamp.org - +

{t('report.portfolio-2', { username: username })}

@@ -133,7 +134,7 @@ function ShowUser({ - +
diff --git a/client/src/components/Donation/donate-completion.tsx b/client/src/components/Donation/donate-completion.tsx index a9de43ad058..81fe986eda2 100644 --- a/client/src/components/Donation/donate-completion.tsx +++ b/client/src/components/Donation/donate-completion.tsx @@ -1,9 +1,9 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import Spinner from 'react-spinkit'; -import { Alert } from '@freecodecamp/ui'; +import { Alert, Spacer } from '@freecodecamp/ui'; -import { Link, Spacer } from '../helpers'; +import { Link } from '../helpers'; type DonateCompletionProps = { error: string | null; @@ -37,7 +37,7 @@ function DonateCompletion({ return ( {heading} - +
{(processing || redirecting) && ( { return ( <>
{confirmationWithEditAmount}
- +
- + )} @@ -109,7 +108,7 @@ const Benefits = ({ setShowForm }: { setShowForm: (arg: boolean) => void }) => { - + - + ); @@ -195,7 +194,7 @@ const BecomeASupporterConfirmation = ({ donationAttempted={donationAttempted} showForm={showForm} /> - + {showForm ? ( {

{t('donate.help-more')}

- +

{t('donate.efficiency')}

{t('donate.why-donate-1')} @@ -50,7 +50,7 @@ export const ThankYouMessage = ({

{t('donate.thank-you')}

{(askForDonation || thankContributon) && ( <> - +

{t('donate.crucial-contribution')}

)} @@ -201,7 +201,7 @@ export const DonationFaqText = (): JSX.Element => { return ( <>

{t('donate.faq')}

- + {faqItems.map((item, iterator) => FaqItem(item.Q, item.A, iterator))} ); @@ -311,7 +311,7 @@ export const GetSupporterBenefitsText = ({ const { t } = useTranslation(); return ( <> - +

{t('donate.as-you-see')}

{!isDonating ?

{t('donate.get-benefits')}

: null} diff --git a/client/src/components/Donation/multi-tier-donation-form.tsx b/client/src/components/Donation/multi-tier-donation-form.tsx index 8126c36cd11..8b6c9556c9a 100644 --- a/client/src/components/Donation/multi-tier-donation-form.tsx +++ b/client/src/components/Donation/multi-tier-donation-form.tsx @@ -5,11 +5,11 @@ import { TabsTrigger, TabsList, Col, - Row + Row, + Spacer } from '@freecodecamp/ui'; import { useFeature } from '@growthbook/growthbook-react'; import { useTranslation } from 'react-i18next'; -import { Spacer } from '../helpers'; import { PaymentContext, @@ -57,7 +57,7 @@ function SelectionTabs({ usd: formattedAmountLabel(donationAmount) })} - + ))} - + {subscriptionAmounts.map(value => { const usd = formattedAmountLabel(donationAmount); const hours = convertToTimeContributed(donationAmount); @@ -103,7 +103,7 @@ function SelectionTabs({ ? t('buttons.confirm-amount') : t('buttons.donate')} - + ); @@ -132,7 +132,7 @@ function DonationFormRow({ editAmount={() => setShowDonateForm(false)} selectedDonationAmount={donationAmount} /> - + ); diff --git a/client/src/components/Footer/__snapshots__/footer.test.tsx.snap b/client/src/components/Footer/__snapshots__/footer.test.tsx.snap index 10470f61166..174bd89b074 100644 --- a/client/src/components/Footer/__snapshots__/footer.test.tsx.snap +++ b/client/src/components/Footer/__snapshots__/footer.test.tsx.snap @@ -317,12 +317,7 @@ exports[`
matches snapshot 1`] = `

- +

diff --git a/client/src/components/FourOhFour/index.tsx b/client/src/components/FourOhFour/index.tsx index 0e6aff212a9..4fd6dae3b4a 100644 --- a/client/src/components/FourOhFour/index.tsx +++ b/client/src/components/FourOhFour/index.tsx @@ -2,10 +2,11 @@ import { RouteComponentProps } from '@reach/router'; import React from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; +import { Spacer } from '@freecodecamp/ui'; import notFoundLogo from '../../assets/images/freeCodeCamp-404.svg'; import { randomQuote } from '../../utils/get-words'; -import { Spacer, Link } from '../helpers'; +import { Link } from '../helpers'; import './404.css'; @@ -21,16 +22,16 @@ const FourOhFour = (_props: RouteComponentProps): JSX.Element => { src={notFoundLogo} data-playwright-test-label='not-found-image' /> - +

{t('404.page-not-found')}.

- +

{t('404.heres-a-quote')}

- +
{

- + - +

{t('learn.read-this.heading')}

- + {[...Array(8).keys()].map(i => (

{t(`learn.read-this.p${i + 1}`)} diff --git a/client/src/components/Intro/index.tsx b/client/src/components/Intro/index.tsx index 65bec52f7b0..84e31218c27 100644 --- a/client/src/components/Intro/index.tsx +++ b/client/src/components/Intro/index.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; +import { Spacer } from '@freecodecamp/ui'; import { randomQuote } from '../../utils/get-words'; import Login from '../Header/components/login'; -import { Link, Spacer, Loader } from '../helpers'; +import { Link, Loader } from '../helpers'; import IntroDescription from './components/intro-description'; import './intro.css'; @@ -34,22 +35,22 @@ const Intro = ({ if (pending && !complete) { return ( <> - + - + ); } else if (isSignedIn) { const { quote, author } = randomQuote(); return ( <> - +

{name ? `${t('learn.welcome-1', { name: name })}` : `${t('learn.welcome-2')}`}

- +
@@ -66,7 +67,7 @@ const Intro = ({ /> {completedChallengeCount && slug && completedChallengeCount < 15 ? (
- +

@@ -81,7 +82,7 @@ const Intro = ({ } else { return ( <> - +

{t('learn.heading')}

- + - + {t('buttons.logged-out-cta-btn')} - + ); } diff --git a/client/src/components/Intro/learn-alert.tsx b/client/src/components/Intro/learn-alert.tsx index 4deaefa4243..3d0a9b1bb44 100644 --- a/client/src/components/Intro/learn-alert.tsx +++ b/client/src/components/Intro/learn-alert.tsx @@ -1,8 +1,8 @@ import React from 'react'; -import { Alert } from '@freecodecamp/ui'; +import { Alert, Spacer } from '@freecodecamp/ui'; import { useFeature } from '@growthbook/growthbook-react'; import { useTranslation } from 'react-i18next'; -import { Link, Spacer } from '../helpers'; +import { Link } from '../helpers'; import { ProgressBar } from '../Progress/progress-bar'; interface LearnAlertProps { @@ -24,7 +24,7 @@ const LearnAlert = ({ <>

{t('learn.donation-heading')}

- + {`${value}%`}

- + {benefitItems.map((benefit, index) => { @@ -43,10 +42,10 @@ const Benefits = (): JSX.Element => { data-playwright-test-label='landing-page-description' > {/* Dynamically render the icon */} - +

{benefit.title}

{benefit.description}

- +
); })} @@ -54,7 +53,7 @@ const Benefits = (): JSX.Element => { - + diff --git a/client/src/components/landing/components/certifications.tsx b/client/src/components/landing/components/certifications.tsx index ca4c2170a57..1d4d2ce102c 100644 --- a/client/src/components/landing/components/certifications.tsx +++ b/client/src/components/landing/components/certifications.tsx @@ -1,8 +1,7 @@ import React from 'react'; -import { Col } from '@freecodecamp/ui'; +import { Col, Spacer } from '@freecodecamp/ui'; import Map from '../../Map/index'; -import { Spacer } from '../../helpers'; import { type SuperBlocks } from '../../../../../shared/config/curriculum'; import BigCallToAction from './big-call-to-action'; @@ -24,9 +23,9 @@ const Certifications = ({ xs={12} > - + - + ); }; diff --git a/client/src/components/landing/components/faq.tsx b/client/src/components/landing/components/faq.tsx index 45af7b083cb..151acf39f57 100644 --- a/client/src/components/landing/components/faq.tsx +++ b/client/src/components/landing/components/faq.tsx @@ -1,8 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Col } from '@freecodecamp/ui'; +import { Col, Spacer } from '@freecodecamp/ui'; -import { Spacer } from '../../helpers'; import BigCallToAction from './big-call-to-action'; interface FaqItem { @@ -24,7 +23,7 @@ const Faq = (): JSX.Element => { className='faq-section' >

{t('landing.faq')}

- + {faqItems.map((faq, i) => (
{ {faq.answer.map((answer, i) => (

{answer}

))} - +
))}

{t('learn.read-this.p12')}

- + - + ); }; diff --git a/client/src/components/landing/components/landing-top-b.tsx b/client/src/components/landing/components/landing-top-b.tsx index 9a667a25673..920b280c05d 100644 --- a/client/src/components/landing/components/landing-top-b.tsx +++ b/client/src/components/landing/components/landing-top-b.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Trans, useTranslation } from 'react-i18next'; -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; import { clientLocale } from '../../../../config/env.json'; import { AmazonLogo, @@ -11,7 +11,6 @@ import { TencentLogo, AlibabaLogo } from '../../../assets/images/components'; -import { Spacer } from '../../helpers'; import BigCallToAction from './big-call-to-action'; import CampersImage from './campers-image'; @@ -57,7 +56,7 @@ function LandingTop(): JSX.Element { return ( - +

- + - + diff --git a/client/src/components/landing/components/landing-top.tsx b/client/src/components/landing/components/landing-top.tsx index 9106de1ff19..a47ee5df7aa 100644 --- a/client/src/components/landing/components/landing-top.tsx +++ b/client/src/components/landing/components/landing-top.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; import { clientLocale } from '../../../../config/env.json'; import { @@ -12,7 +12,6 @@ import { TencentLogo, AlibabaLogo } from '../../../assets/images/components'; -import { Spacer } from '../../helpers'; import BigCallToAction from './big-call-to-action'; import CampersImage from './campers-image'; @@ -24,7 +23,7 @@ function LandingTop(): JSX.Element { return ( - +

)}

- + - + diff --git a/client/src/components/landing/components/ui-images.tsx b/client/src/components/landing/components/ui-images.tsx index a483c8263b2..21d889547a4 100644 --- a/client/src/components/landing/components/ui-images.tsx +++ b/client/src/components/landing/components/ui-images.tsx @@ -1,9 +1,10 @@ // eslint-disable-next-line filenames-simple/naming-convention import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Spacer } from '@freecodecamp/ui'; import Media from 'react-responsive'; import landingPageb from '../../../assets/images/landing/landing-page-b.svg'; -import { LazyImage, Spacer } from '../../helpers'; +import { LazyImage } from '../../helpers'; const LARGE_SCREEN_SIZE = 1200; @@ -18,7 +19,7 @@ function UIImages(): JSX.Element { > - + ); } diff --git a/client/src/components/layouts/default.tsx b/client/src/components/layouts/default.tsx index ba06a19ee6b..36c5be6227e 100644 --- a/client/src/components/layouts/default.tsx +++ b/client/src/components/layouts/default.tsx @@ -5,6 +5,7 @@ import { useMediaQuery } from 'react-responsive'; import { connect } from 'react-redux'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; +import { Spacer } from '@freecodecamp/ui'; import envData, { clientLocale } from '../../../config/env.json'; import latoBoldURL from '../../../static/fonts/lato/Lato-Bold.woff'; @@ -43,7 +44,7 @@ import StagingWarningModal from '../staging-warning-modal'; import Footer from '../Footer'; import Header from '../Header'; import OfflineWarning from '../OfflineWarning'; -import { Loader, Spacer } from '../helpers'; +import { Loader } from '../helpers'; import { MAX_MOBILE_WIDTH, EX_SMALL_VIEWPORT_HEIGHT @@ -292,7 +293,7 @@ function DefaultLayout({ />
) : ( - + ))} {fetchState.complete && children}
diff --git a/client/src/components/profile/__snapshots__/profile.test.tsx.snap b/client/src/components/profile/__snapshots__/profile.test.tsx.snap index 5963555c21a..0f52c5a40c6 100644 --- a/client/src/components/profile/__snapshots__/profile.test.tsx.snap +++ b/client/src/components/profile/__snapshots__/profile.test.tsx.snap @@ -3,15 +3,13 @@ exports[` renders correctly 1`] = `
renders correctly 1`] = `
renders correctly 1`] = `
renders correctly 1`] = `
diff --git a/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap b/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap index a6339096511..d039bd280f6 100644 --- a/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap +++ b/client/src/components/profile/components/__snapshots__/timeline-buttons.test.js.snap @@ -11,12 +11,7 @@ exports[`should check certification page consistency 1`] = ` profile.timeline
{name &&

{name}

} - + {about &&

{about}

}
{joinDate && ( diff --git a/client/src/components/profile/components/certifications.tsx b/client/src/components/profile/components/certifications.tsx index a8395bfc5b1..9b39d86e17a 100644 --- a/client/src/components/profile/components/certifications.tsx +++ b/client/src/components/profile/components/certifications.tsx @@ -2,10 +2,11 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; +import { Spacer } from '@freecodecamp/ui'; import { certificatesByNameSelector } from '../../../redux/selectors'; import type { CurrentCert } from '../../../redux/prop-types'; -import { FullWidthRow, Spacer, ButtonLink } from '../../helpers'; +import { FullWidthRow, ButtonLink } from '../../helpers'; import './certifications.css'; const mapStateToProps = ( @@ -56,7 +57,7 @@ function CertButton({ username, cert }: CertButtonProps): JSX.Element { certTitle: t(`certification.title.${cert.certSlug}`) })} - + ); } @@ -86,11 +87,11 @@ function Certificates({ )} {hasLegacyCert && (
- +

{t('settings.headings.legacy-certs')}

- + {legacyCerts && ( <>
    @@ -104,7 +105,7 @@ function Certificates({ /> ))}
- + )}
diff --git a/client/src/components/profile/components/heat-map.tsx b/client/src/components/profile/components/heat-map.tsx index 01886d52f88..47a79557a3f 100644 --- a/client/src/components/profile/components/heat-map.tsx +++ b/client/src/components/profile/components/heat-map.tsx @@ -9,7 +9,7 @@ import React, { Component } from 'react'; import type { TFunction } from 'i18next'; import { useTranslation } from 'react-i18next'; import ReactTooltip from 'react-tooltip'; -import { Row } from '@freecodecamp/ui'; +import { Row, Spacer } from '@freecodecamp/ui'; import '@freecodecamp/react-calendar-heatmap/dist/styles.css'; import './heatmap.css'; @@ -20,7 +20,6 @@ import envData from '../../../../config/env.json'; import { getLangCode } from '../../../../../shared/config/i18n'; import { User } from '../../../redux/prop-types'; import FullWidthRow from '../../helpers/full-width-row'; -import Spacer from '../../helpers/spacer'; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const { clientLocale } = envData; @@ -98,7 +97,7 @@ class HeatMapInner extends Component { return ( - + { > - +
); diff --git a/client/src/components/profile/components/portfolio-projects.tsx b/client/src/components/profile/components/portfolio-projects.tsx index eee49f3cc13..df770d6d1a3 100644 --- a/client/src/components/profile/components/portfolio-projects.tsx +++ b/client/src/components/profile/components/portfolio-projects.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Spacer } from '@freecodecamp/ui'; import type { PortfolioProjectData } from '../../../redux/prop-types'; import './portfolio-projects.css'; -import { FullWidthRow, Spacer } from '../../helpers'; +import { FullWidthRow } from '../../helpers'; interface PortfolioProjectsProps { portfolioProjects: PortfolioProjectData[]; @@ -48,7 +49,7 @@ export const PortfolioProjects = ({
))} - +
); diff --git a/client/src/components/profile/components/portfolio.tsx b/client/src/components/profile/components/portfolio.tsx index 78781318866..987277134c2 100644 --- a/client/src/components/profile/components/portfolio.tsx +++ b/client/src/components/profile/components/portfolio.tsx @@ -8,7 +8,8 @@ import { ControlLabel, HelpBlock, FormGroupProps, - Button + Button, + Spacer } from '@freecodecamp/ui'; import { withTranslation } from 'react-i18next'; import isURL from 'validator/lib/isURL'; @@ -16,7 +17,7 @@ import { PortfolioProjectData } from '../../../redux/prop-types'; import { hasProtocolRE } from '../../../utils'; -import { FullWidthRow, Spacer } from '../../helpers'; +import { FullWidthRow } from '../../helpers'; import BlockSaveButton from '../../helpers/form/block-save-button'; import SectionHeader from '../../settings/section-header'; @@ -361,7 +362,7 @@ class PortfolioSettings extends Component { > {t('buttons.save-portfolio')} - + - + {portfolio.length ? portfolio.map(this.renderPortfolio) : null} ); diff --git a/client/src/components/profile/components/stats.tsx b/client/src/components/profile/components/stats.tsx index 5fe70ab127d..05a46366319 100644 --- a/client/src/components/profile/components/stats.tsx +++ b/client/src/components/profile/components/stats.tsx @@ -3,9 +3,10 @@ import { useTranslation } from 'react-i18next'; import addDays from 'date-fns/addDays'; import addMonths from 'date-fns/addMonths'; import isEqual from 'date-fns/isEqual'; +import { Spacer } from '@freecodecamp/ui'; import startOfDay from 'date-fns/startOfDay'; import { User } from '../../../redux/prop-types'; -import { FullWidthRow, Spacer } from '../../helpers'; +import { FullWidthRow } from '../../helpers'; import './stats.css'; interface StatsProps { @@ -113,7 +114,7 @@ function Stats({ points, calendar }: StatsProps): JSX.Element { return (

{t('profile.stats')}

- +
diff --git a/client/src/components/profile/components/time-line.tsx b/client/src/components/profile/components/time-line.tsx index 7f71b5b6b82..0bb5c9c1519 100644 --- a/client/src/components/profile/components/time-line.tsx +++ b/client/src/components/profile/components/time-line.tsx @@ -5,7 +5,7 @@ import React, { useMemo, useState } from 'react'; import type { TFunction } from 'i18next'; import { withTranslation } from 'react-i18next'; import { connect } from 'react-redux'; -import { Table, Button, Modal } from '@freecodecamp/ui'; +import { Table, Button, Modal, Spacer } from '@freecodecamp/ui'; import envData from '../../../../config/env.json'; import { getLangCode } from '../../../../../shared/config/i18n'; @@ -16,7 +16,7 @@ import { CompletedChallenge } from '../../../redux/prop-types'; import ProjectPreviewModal from '../../../templates/Challenges/components/project-preview-modal'; import ExamResultsModal from '../../SolutionViewer/exam-results-modal'; import { openModal } from '../../../templates/Challenges/redux/actions'; -import { Link, FullWidthRow, Spacer } from '../../helpers'; +import { Link, FullWidthRow } from '../../helpers'; import { SolutionDisplayWidget } from '../../solution-display-widget'; import { SuperBlocks } from '../../../../../shared/config/curriculum'; import TimelinePagination from './timeline-pagination'; @@ -177,7 +177,7 @@ function TimelineInner({ return (

{t('profile.timeline')}

- + {completedMap.length === 0 ? (

{t('profile.none-completed')}  diff --git a/client/src/components/profile/profile.tsx b/client/src/components/profile/profile.tsx index 65632f9521e..0f5375fbecd 100644 --- a/client/src/components/profile/profile.tsx +++ b/client/src/components/profile/profile.tsx @@ -2,8 +2,8 @@ import React, { useState } from 'react'; import Helmet from 'react-helmet'; import type { TFunction } from 'i18next'; import { useTranslation } from 'react-i18next'; -import { Alert, Container, Modal, Row } from '@freecodecamp/ui'; -import { FullWidthRow, Link, Spacer } from '../helpers'; +import { Alert, Container, Modal, Row, Spacer } from '@freecodecamp/ui'; +import { FullWidthRow, Link } from '../helpers'; import Portfolio from './components/portfolio'; import UsernameSettings from './components/username'; @@ -45,7 +45,7 @@ const UserMessage = ({ t }: Pick) => { return ( {t('profile.you-change-privacy')} - + ); }; @@ -77,7 +77,7 @@ const EditModal = ({ {t('profile.edit-my-profile')} - + - + - + {t('profile.username-change-privacy', { username })} - + ); }; @@ -206,7 +206,7 @@ function UserProfile({ {showTimeLine ? ( ) : null} - + ); } @@ -231,9 +231,9 @@ function Profile({ {t('buttons.profile')} | freeCodeCamp.org - + - + {isLocked && ( )} @@ -253,7 +253,7 @@ function Profile({ )} - + ); diff --git a/client/src/components/settings/certification.tsx b/client/src/components/settings/certification.tsx index 914c1aaa054..9f70461bdd5 100644 --- a/client/src/components/settings/certification.tsx +++ b/client/src/components/settings/certification.tsx @@ -5,7 +5,7 @@ import type { TFunction } from 'i18next'; import { createSelector } from 'reselect'; import ScrollableAnchor, { configureAnchors } from 'react-scrollable-anchor'; import { connect } from 'react-redux'; -import { Table, Button } from '@freecodecamp/ui'; +import { Table, Button, Spacer } from '@freecodecamp/ui'; import { regeneratePathAndHistory } from '../../../../shared/utils/polyvinyl'; import ProjectPreviewModal from '../../templates/Challenges/components/project-preview-modal'; @@ -20,7 +20,7 @@ import { } from '../../../config/cert-and-project-map'; import { FlashMessages } from '../Flash/redux/flash-messages'; import ProjectModal from '../SolutionViewer/project-modal'; -import { FullWidthRow, Spacer, Link } from '../helpers'; +import { FullWidthRow, Link } from '../helpers'; import { SolutionDisplayWidget } from '../solution-display-widget'; import { Certification, @@ -190,7 +190,7 @@ const LegacyFullStack = (props: CertificationSettingsProps) => { return ( - +

{t('certification.title.Legacy Full Stack Certification')}

@@ -247,7 +247,7 @@ const LegacyFullStack = (props: CertificationSettingsProps) => { )}
- + ); }; @@ -338,7 +338,7 @@ function CertificationSettings(props: CertificationSettingsProps) {
- +

{t(`certification.title.${certName}`, certName)}

@@ -422,7 +422,7 @@ function CertificationSettings(props: CertificationSettingsProps) { {currentCertTitles.map(title => ( ))} - + {t('settings.headings.legacy-certs')} {legacyCertTitles.map(title => ( diff --git a/client/src/components/settings/danger-zone.tsx b/client/src/components/settings/danger-zone.tsx index 92fd7aedc95..55edc5386ec 100644 --- a/client/src/components/settings/danger-zone.tsx +++ b/client/src/components/settings/danger-zone.tsx @@ -4,10 +4,10 @@ import { withTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; -import { Panel, Button } from '@freecodecamp/ui'; +import { Panel, Button, Spacer } from '@freecodecamp/ui'; import { deleteAccount, resetProgress } from '../../redux/settings/actions'; -import { FullWidthRow, Spacer } from '../helpers'; +import { FullWidthRow } from '../helpers'; import DeleteModal from './delete-modal'; import ResetModal from './reset-modal'; @@ -44,7 +44,7 @@ function DangerZone({ deleteAccount, resetProgress, t }: DangerZoneProps) { {t('settings.danger.heading')} - +

{t('settings.danger.be-careful')}

- + - +
diff --git a/client/src/components/settings/delete-modal.tsx b/client/src/components/settings/delete-modal.tsx index b1d83abeb27..3a08d17e7f0 100644 --- a/client/src/components/settings/delete-modal.tsx +++ b/client/src/components/settings/delete-modal.tsx @@ -5,11 +5,10 @@ import { ControlLabel, FormControl, FormGroup, - Modal + Modal, + Spacer } from '@freecodecamp/ui'; -import { Spacer } from '../helpers'; - type DeleteModalProps = { delete: () => void; onHide: () => void; @@ -54,21 +53,21 @@ function DeleteModal(props: DeleteModalProps): JSX.Element { > {t('settings.danger.nevermind')} - + {t('settings.danger.verify-text', { verifyText: t('settings.danger.verify-delete-text') })} - + - + - + {t('settings.danger.verify-text', { verifyText: t('settings.danger.verify-reset-text') })} - + - + - +
diff --git a/client/src/components/signout-modal/index.tsx b/client/src/components/signout-modal/index.tsx index e0391204cf6..41a2a4aab1f 100644 --- a/client/src/components/signout-modal/index.tsx +++ b/client/src/components/signout-modal/index.tsx @@ -3,9 +3,8 @@ import { bindActionCreators, Dispatch, AnyAction } from 'redux'; import { createSelector } from 'reselect'; import { connect } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { Button, Modal } from '@freecodecamp/ui'; +import { Button, Modal, Spacer } from '@freecodecamp/ui'; -import { Spacer } from '../helpers'; import { hardGoTo as navigate, closeSignoutModal } from '../../redux/actions'; import { isSignoutModalOpenSelector } from '../../redux/selectors'; import { apiLocation } from '../../../config/env.json'; @@ -64,7 +63,7 @@ function SignoutModal(props: SignoutModalProps): JSX.Element { > {t('signout.nevermind')} - + - + ); diff --git a/client/src/pages/blocked.tsx b/client/src/pages/blocked.tsx index b04540b6e74..0117b838095 100644 --- a/client/src/pages/blocked.tsx +++ b/client/src/pages/blocked.tsx @@ -1,21 +1,19 @@ import React from 'react'; import Helmet from 'react-helmet'; -import { Container, Col, Row } from '@freecodecamp/ui'; - -import { Spacer } from '../components/helpers'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; function BlockedPage(): JSX.Element { return ( <> - +

We can't log you in.

- +
- + ); diff --git a/client/src/pages/donate.tsx b/client/src/pages/donate.tsx index 608ddfc7c15..a279ee03217 100644 --- a/client/src/pages/donate.tsx +++ b/client/src/pages/donate.tsx @@ -1,4 +1,4 @@ -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; import type { TFunction } from 'i18next'; import React, { useEffect } from 'react'; import Helmet from 'react-helmet'; @@ -16,7 +16,7 @@ import { CommunityAchievementsText, GetSupporterBenefitsText } from '../components/Donation/donation-text-components'; -import { Spacer, Loader } from '../components/helpers'; +import { Loader } from '../components/helpers'; import { signInLoadingSelector, userSelector, @@ -93,19 +93,19 @@ function DonatePage({
- + - + - + @@ -118,9 +118,9 @@ function DonatePage({ - +
- + @@ -130,7 +130,7 @@ function DonatePage({ - + ); diff --git a/client/src/pages/email-sign-up.tsx b/client/src/pages/email-sign-up.tsx index 6a406878472..a5860edca6c 100644 --- a/client/src/pages/email-sign-up.tsx +++ b/client/src/pages/email-sign-up.tsx @@ -5,11 +5,11 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row, Button } from '@freecodecamp/ui'; +import { Container, Col, Row, Button, Spacer } from '@freecodecamp/ui'; import IntroDescription from '../components/Intro/components/intro-description'; import createRedirect from '../components/create-redirect'; -import { Spacer, Loader, Link } from '../components/helpers'; +import { Loader, Link } from '../components/helpers'; import { apiLocation } from '../../config/env.json'; import { acceptTerms } from '../redux/actions'; @@ -71,7 +71,7 @@ function EmailListOptIn({ > {t('buttons.yes-please')} - +
- + @@ -90,7 +90,7 @@ function EmailListOptIn({ } else { return ( - + - + ); } @@ -133,9 +133,9 @@ function AcceptPrivacyTerms({ {isSignedIn && completedChallengeCount < 1 ? ( - +

{t('misc.brand-new-account')}

- +

@@ -148,16 +148,16 @@ function AcceptPrivacyTerms({ )}

- +
- +

{t('misc.email-blast')}

- + {showLoading ? ( @@ -165,7 +165,7 @@ function AcceptPrivacyTerms({ )}
- + diff --git a/client/src/pages/learn.tsx b/client/src/pages/learn.tsx index b782acccf0d..41458f65f2d 100644 --- a/client/src/pages/learn.tsx +++ b/client/src/pages/learn.tsx @@ -4,11 +4,10 @@ import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; import Intro from '../components/Intro'; import Map from '../components/Map'; -import { Spacer } from '../components/helpers'; import LearnLayout from '../components/layouts/learn'; import { isSignedInSelector, @@ -107,7 +106,7 @@ function LearnPage({ isDonating={isDonating} /> node.challenge)} /> - + diff --git a/client/src/pages/supporters.tsx b/client/src/pages/supporters.tsx index acd69356d18..d21fa21d771 100644 --- a/client/src/pages/supporters.tsx +++ b/client/src/pages/supporters.tsx @@ -3,10 +3,9 @@ import Helmet from 'react-helmet'; import { withTranslation, useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { Container, Row, Col } from '@freecodecamp/ui'; +import { Container, Row, Col, Spacer } from '@freecodecamp/ui'; import BigCallToAction from '../components/landing/components/big-call-to-action'; -import { Spacer } from '../components/helpers'; import { isSignedInSelector, isDonatingSelector, @@ -62,13 +61,13 @@ function ConditionalContent({ if (isSignedIn && !isDonating) { return ( - +

{t('learn.donation-record-not-found')}

- +

{t('learn.contact-support-mistake')}

- + ); } else if (isSignedIn && isDonating) { @@ -82,7 +81,7 @@ function ConditionalContent({
- + @@ -90,13 +89,13 @@ function ConditionalContent({ } else return ( - +

{t('learn.sign-in-see-benefits')}

- + - + ); } @@ -132,13 +131,13 @@ function SupportersPage({ isSignedIn, isDonating }: SupportersPageProps) { - +
- + ); diff --git a/client/src/pages/update-stripe-card.tsx b/client/src/pages/update-stripe-card.tsx index 81137915074..75e6800269f 100644 --- a/client/src/pages/update-stripe-card.tsx +++ b/client/src/pages/update-stripe-card.tsx @@ -5,10 +5,9 @@ import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { Container, Row, Col, Button } from '@freecodecamp/ui'; +import { Container, Row, Col, Button, Spacer } from '@freecodecamp/ui'; import BigCallToAction from '../components/landing/components/big-call-to-action'; -import { Spacer } from '../components/helpers'; import { isSignedInSelector, isDonatingSelector, @@ -62,7 +61,7 @@ function ConditionalContent({ return ( <>

{t('learn.donation-record-not-found')}

- +

{t('learn.contact-support-mistake')}

); @@ -80,7 +79,7 @@ function ConditionalContent({ } else return ( <> - + @@ -90,7 +89,7 @@ function ConditionalContent({ return ( <>

{t('learn.sign-in-card-update')}

- + ); @@ -126,14 +125,14 @@ function UpdateStripeCard({
- + - + diff --git a/client/src/templates/Challenges/classic/lower-jaw.tsx b/client/src/templates/Challenges/classic/lower-jaw.tsx index 2bb381196c6..50a01c12c00 100644 --- a/client/src/templates/Challenges/classic/lower-jaw.tsx +++ b/client/src/templates/Challenges/classic/lower-jaw.tsx @@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { createSelector } from 'reselect'; -import { Button } from '@freecodecamp/ui'; +import { Button, Spacer } from '@freecodecamp/ui'; import { connect } from 'react-redux'; import Fail from '../../../assets/icons/fail'; import LightBulb from '../../../assets/icons/lightbulb'; @@ -22,7 +22,6 @@ import { completedPercentageSelector } from '../redux/selectors'; import callGA from '../../../analytics/call-ga'; -import { Spacer } from '../../../components/helpers'; interface LowerJawPanelProps extends ShareProps { resetButtonText: string; @@ -320,7 +319,7 @@ const LowerJaw = ({ > {t('learn.sign-in-save')} - + )} - + {superBlock === SuperBlocks.RelationalDb && } - + {title} - + - +

{t('learn.gitpod.intro')}

@@ -316,7 +315,7 @@ class ShowCodeAlly extends Component {
- + {isSignedIn && challengeType === challengeTypes.codeAllyCert && ( <> @@ -324,18 +323,18 @@ class ShowCodeAlly extends Component { {t('learn.complete-both-steps')}
- + - +
{t('learn.runs-in-vm')}
- + - + )} @@ -382,18 +381,18 @@ class ShowCodeAlly extends Component { challengeType === challengeTypes.codeAllyCert && ( <>
- + - +
{t('learn.submit-public-url')}
- + - + { /> )} - +
- + diff --git a/client/src/templates/Challenges/components/assignments.tsx b/client/src/templates/Challenges/components/assignments.tsx index 1282a00ae06..8453b3f48a1 100644 --- a/client/src/templates/Challenges/components/assignments.tsx +++ b/client/src/templates/Challenges/components/assignments.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Spacer } from '@freecodecamp/ui'; -import Spacer from '../../../components/helpers/spacer'; import ChallengeHeading from './challenge-heading'; import PrismFormatted from './prism-formatted'; @@ -36,19 +36,19 @@ function Assignments({ } /> - + ))} {!allAssignmentsCompleted && ( <> - +
{t('learn.assignment-not-complete')}
)} - + ); } diff --git a/client/src/templates/Challenges/components/challenge-explanation.tsx b/client/src/templates/Challenges/components/challenge-explanation.tsx index ed211c34216..3803602460a 100644 --- a/client/src/templates/Challenges/components/challenge-explanation.tsx +++ b/client/src/templates/Challenges/components/challenge-explanation.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; -import Spacer from '../../../components/helpers/spacer'; +import { Spacer } from '@freecodecamp/ui'; import PrismFormatted from './prism-formatted'; interface ChallengeExplanationProps { @@ -16,10 +16,10 @@ function ChallengeExplanation({ <>
{t('learn.explanation')} - +
- + ); } diff --git a/client/src/templates/Challenges/components/completion-modal.tsx b/client/src/templates/Challenges/components/completion-modal.tsx index 251b9da65eb..3db53c5b654 100644 --- a/client/src/templates/Challenges/components/completion-modal.tsx +++ b/client/src/templates/Challenges/components/completion-modal.tsx @@ -5,7 +5,7 @@ import type { TFunction } from 'i18next'; import { withTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { Button, Modal } from '@freecodecamp/ui'; +import { Button, Modal, Spacer } from '@freecodecamp/ui'; import Login from '../../../components/Header/components/login'; import { isSignedInSelector } from '../../../redux/selectors'; @@ -21,7 +21,6 @@ import { } from '../redux/selectors'; import Progress from '../../../components/Progress'; import GreenPass from '../../../assets/icons/green-pass'; -import { Spacer } from '../../../components/helpers'; import { MAX_MOBILE_WIDTH } from '../../../../config/misc'; import './completion-modal.css'; import callGA from '../../../analytics/call-ga'; @@ -206,7 +205,7 @@ class CompletionModal extends Component< {isSignedIn ? null : (
{t('learn.sign-in-save')} - +
)} - + {this.state.downloadURL ? ( - + - + )} <> - + - +
- +
{examResultsMessage}
- +
{t('learn.exam.question-results', { @@ -93,8 +92,8 @@ ${t('learn.exam.time', { t: formatSecondsToTime(examTimeInSeconds) })} {t('learn.exam.time', { t: formatSecondsToTime(examTimeInSeconds) })}
- - + +
- + - + diff --git a/client/src/templates/Challenges/exam/components/finish-exam-modal.tsx b/client/src/templates/Challenges/exam/components/finish-exam-modal.tsx index 0e5b6ed844c..b5e755b4f66 100644 --- a/client/src/templates/Challenges/exam/components/finish-exam-modal.tsx +++ b/client/src/templates/Challenges/exam/components/finish-exam-modal.tsx @@ -4,12 +4,11 @@ import { connect } from 'react-redux'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; import { useTranslation } from 'react-i18next'; -import { Button, Modal } from '@freecodecamp/ui'; +import { Button, Modal, Spacer } from '@freecodecamp/ui'; // Local Utilities import { closeModal } from '../../redux/actions'; import { isFinishExamModalOpenSelector } from '../../redux/selectors'; -import { Spacer } from '../../../../components/helpers'; // Types interface FinishExamModalProps { @@ -59,7 +58,7 @@ function FinishExamModal({ > {t('learn.exam.finish-yes')} - + - +
{examResults ? ( {
- +
{ )} /> - +
{generatedExamQuestions[currentQuestionIndex].answers.map( ({ answer, id }) => ( @@ -466,7 +465,7 @@ class ShowExam extends Component { )}
- +
- +
- + - + diff --git a/client/src/templates/Challenges/generic/show.tsx b/client/src/templates/Challenges/generic/show.tsx index cb067a48471..53c1a11d73c 100644 --- a/client/src/templates/Challenges/generic/show.tsx +++ b/client/src/templates/Challenges/generic/show.tsx @@ -3,10 +3,9 @@ import React, { useEffect, useRef, useState } from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; import { connect } from 'react-redux'; -import { Container, Col, Row, Button } from '@freecodecamp/ui'; +import { Container, Col, Row, Button, Spacer } from '@freecodecamp/ui'; // Local Utilities -import Spacer from '../../../components/helpers/spacer'; import LearnLayout from '../../../components/layouts/learn'; import { ChallengeNode, ChallengeMeta, Test } from '../../../redux/prop-types'; import ChallengeDescription from '../components/challenge-description'; @@ -164,7 +163,7 @@ const ShowGeneric = ({ /> - + - + )} @@ -205,7 +204,7 @@ const ShowGeneric = ({ )} - + {assignments.length > 0 && ( - + diff --git a/client/src/templates/Challenges/ms-trophy/link-ms-user.tsx b/client/src/templates/Challenges/ms-trophy/link-ms-user.tsx index 12e4638be9e..0455defd332 100644 --- a/client/src/templates/Challenges/ms-trophy/link-ms-user.tsx +++ b/client/src/templates/Challenges/ms-trophy/link-ms-user.tsx @@ -9,10 +9,10 @@ import { FormControl, FormGroup, HelpBlock, - Button + Button, + Spacer } from '@freecodecamp/ui'; -import { Spacer } from '../../../components/helpers'; import { isMicrosoftTranscriptLink } from '../../../../../shared/utils/validate'; import { linkMsUsername, @@ -88,7 +88,7 @@ function LinkMsUser({ return !isSignedIn ? ( <> - +

{t('learn.ms.link-signin')}

@@ -110,7 +110,7 @@ function LinkMsUser({ ) : (
- +

{t('learn.ms.unlinked')}

    @@ -136,7 +136,7 @@ function LinkMsUser({
  1. {t('learn.ms.link-li-6')}
- +
diff --git a/client/src/templates/Challenges/ms-trophy/show.tsx b/client/src/templates/Challenges/ms-trophy/show.tsx index b1d91303b45..f0644f7659b 100644 --- a/client/src/templates/Challenges/ms-trophy/show.tsx +++ b/client/src/templates/Challenges/ms-trophy/show.tsx @@ -8,8 +8,7 @@ import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row, Button } from '@freecodecamp/ui'; -import Spacer from '../../../components/helpers/spacer'; +import { Container, Col, Row, Button, Spacer } from '@freecodecamp/ui'; import LearnLayout from '../../../components/layouts/learn'; import { ChallengeNode, ChallengeMeta, Test } from '../../../redux/prop-types'; import ChallengeDescription from '../components/challenge-description'; @@ -198,7 +197,7 @@ class MsTrophy extends Component {
- + { > {t('buttons.verify-trophy')} - +
- + diff --git a/client/src/templates/Challenges/odin/show.tsx b/client/src/templates/Challenges/odin/show.tsx index 8ceb311117d..eb4e2d0624a 100644 --- a/client/src/templates/Challenges/odin/show.tsx +++ b/client/src/templates/Challenges/odin/show.tsx @@ -10,11 +10,10 @@ import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; import { createSelector } from 'reselect'; import { isEqual } from 'lodash-es'; -import { Container, Col, Row, Button } from '@freecodecamp/ui'; +import { Container, Col, Row, Button, Spacer } from '@freecodecamp/ui'; import ShortcutsModal from '../components/shortcuts-modal'; // Local Utilities -import Spacer from '../../../components/helpers/spacer'; import LearnLayout from '../../../components/layouts/learn'; import { ChallengeNode, ChallengeMeta, Test } from '../../../redux/prop-types'; import Hotkeys from '../components/hotkeys'; @@ -292,7 +291,7 @@ class ShowOdin extends Component { {videoId && (
- + { )} - + { {title} - + {scene && ( @@ -355,7 +354,7 @@ class ShowOdin extends Component { {explanation ? ( ) : ( - + )} - + - + diff --git a/client/src/templates/Challenges/projects/backend/show.tsx b/client/src/templates/Challenges/projects/backend/show.tsx index 91f582cc541..6e0b335b38e 100644 --- a/client/src/templates/Challenges/projects/backend/show.tsx +++ b/client/src/templates/Challenges/projects/backend/show.tsx @@ -9,9 +9,8 @@ import { withTranslation } from 'react-i18next'; import type { TFunction } from 'i18next'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; -import Spacer from '../../../../components/helpers/spacer'; import LearnLayout from '../../../../components/layouts/learn'; import { isSignedInSelector } from '../../../../redux/selectors'; import { @@ -231,7 +230,7 @@ class BackEnd extends Component { - + { description={description} instructions={instructions} /> - + { output={output} /> - + diff --git a/client/src/templates/Challenges/projects/frontend/show.tsx b/client/src/templates/Challenges/projects/frontend/show.tsx index 6ca8e98d121..54076b9dcb4 100644 --- a/client/src/templates/Challenges/projects/frontend/show.tsx +++ b/client/src/templates/Challenges/projects/frontend/show.tsx @@ -7,9 +7,8 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; -import Spacer from '../../../../components/helpers/spacer'; import LearnLayout from '../../../../components/layouts/learn'; import { ChallengeNode, @@ -186,7 +185,7 @@ class Project extends Component { - + { description={description} instructions={instructions} /> - + { guideUrl={getGuideUrl({ forumTopicId, title })} />
- + diff --git a/client/src/templates/Challenges/projects/tool-panel.tsx b/client/src/templates/Challenges/projects/tool-panel.tsx index 4f100b4acb0..dcb77f7daef 100644 --- a/client/src/templates/Challenges/projects/tool-panel.tsx +++ b/client/src/templates/Challenges/projects/tool-panel.tsx @@ -3,10 +3,9 @@ import type { TFunction } from 'i18next'; import { withTranslation } from 'react-i18next'; import { connect } from 'react-redux'; import { bindActionCreators, Dispatch } from 'redux'; -import { Button } from '@freecodecamp/ui'; +import { Button, Spacer } from '@freecodecamp/ui'; import { openModal } from '../redux/actions'; -import { Spacer } from '../../../components/helpers'; const mapStateToProps = () => ({}); @@ -41,7 +40,7 @@ function ToolPanel({ > {t('buttons.get-hint')} - + )} - + - + diff --git a/client/src/templates/Introduction/components/block.tsx b/client/src/templates/Introduction/components/block.tsx index 3b935cc532b..cdfc56e6972 100644 --- a/client/src/templates/Introduction/components/block.tsx +++ b/client/src/templates/Introduction/components/block.tsx @@ -5,12 +5,13 @@ import { connect } from 'react-redux'; import ScrollableAnchor from 'react-scrollable-anchor'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; +import { Spacer } from '@freecodecamp/ui'; import { SuperBlocks } from '../../../../../shared/config/curriculum'; import envData from '../../../../config/env.json'; import { isAuditedSuperBlock } from '../../../../../shared/utils/is-audited'; import Caret from '../../../assets/icons/caret'; -import { Link, Spacer } from '../../../components/helpers'; +import { Link } from '../../../components/helpers'; import { completedChallengesSelector } from '../../../redux/selectors'; import { ChallengeNode, CompletedChallenge } from '../../../redux/prop-types'; import { playTone } from '../../../utils/tone'; @@ -427,7 +428,7 @@ class Block extends Component { return ( <> {blockRenderer()} - {isGridBlock && !isProjectBlock ? null : } + {isGridBlock && !isProjectBlock ? null : } ); } diff --git a/client/src/templates/Introduction/components/help-translate.tsx b/client/src/templates/Introduction/components/help-translate.tsx index a3cf59939ed..e0fffe4f259 100644 --- a/client/src/templates/Introduction/components/help-translate.tsx +++ b/client/src/templates/Introduction/components/help-translate.tsx @@ -1,8 +1,9 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; +import { Spacer } from '@freecodecamp/ui'; import { SuperBlocks } from '../../../../../shared/config/curriculum'; import { isAuditedSuperBlock } from '../../../../../shared/utils/is-audited'; -import { Link, Spacer } from '../../../components/helpers'; +import { Link } from '../../../components/helpers'; import envData from '../../../../config/env.json'; @@ -26,7 +27,7 @@ function HelpTranslate({ superBlock }: HelpTranslateProps): JSX.Element | null { return (
- +

{t('learn.help-translate')}

{i18nSuperBlock} - + - + {superBlockIntroText.map((str, i) => (

))} diff --git a/client/src/templates/Introduction/intro.tsx b/client/src/templates/Introduction/intro.tsx index bf707204bca..898c2a91bb1 100644 --- a/client/src/templates/Introduction/intro.tsx +++ b/client/src/templates/Introduction/intro.tsx @@ -3,8 +3,8 @@ import React from 'react'; import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; -import { Container } from '@freecodecamp/ui'; -import { Spacer, ButtonLink } from '../../components/helpers'; +import { Container, Spacer } from '@freecodecamp/ui'; +import { ButtonLink } from '../../components/helpers'; import FullWidthRow from '../../components/helpers/full-width-row'; import LearnLayout from '../../components/layouts/learn'; import type { MarkdownRemark, AllChallengeNode } from '../../redux/prop-types'; @@ -47,11 +47,11 @@ function IntroductionPage({ {t('buttons.first-lesson')} - + {t('buttons.view-curriculum')} - +


diff --git a/client/src/templates/Introduction/super-block-intro.tsx b/client/src/templates/Introduction/super-block-intro.tsx index 45562fc53ec..e5299d12bdb 100644 --- a/client/src/templates/Introduction/super-block-intro.tsx +++ b/client/src/templates/Introduction/super-block-intro.tsx @@ -8,14 +8,13 @@ import { connect } from 'react-redux'; import { configureAnchors } from 'react-scrollable-anchor'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; -import { Container, Col, Row } from '@freecodecamp/ui'; +import { Container, Col, Row, Spacer } from '@freecodecamp/ui'; import { SuperBlocks } from '../../../../shared/config/curriculum'; import { getSuperBlockTitleForMap } from '../../utils/superblock-map-titles'; import DonateModal from '../../components/Donation/donation-modal'; import Login from '../../components/Header/components/login'; import Map from '../../components/Map'; -import { Spacer } from '../../components/helpers'; import callGA from '../../analytics/call-ga'; import { tryToShowDonationModal } from '../../redux/actions'; import { @@ -207,7 +206,7 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
- + { isDonating={user.isDonating} /> - +

{t(`intro:misc-text.courses`)}

- +
{blocks.map(block => { const blockChallenges = challenges.filter( @@ -250,20 +249,20 @@ const SuperBlockIntroductionPage = (props: SuperBlockProp) => {
{!isSignedIn && !signInLoading && ( <> - + {t('buttons.logged-out-cta-btn')} )} - +

{t(`intro:misc-text.browse-other`)}

- + - +