refactor(landing): migrate index to tsx (#43966)

* refactor(landing): migrate index to tsx

This commit refactors `client/src/components/landing/index.js` component into a `.tsx` component

Related issue: freeCodeCamp#43778

* fix: rename intex -> index

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Luis H. Ball Jr
2021-12-02 07:12:46 -08:00
committed by GitHub
parent 78757f20b5
commit f1d5a86edf

View File

@ -1,6 +1,5 @@
import { Grid } from '@freecodecamp/react-bootstrap'; import { Grid } from '@freecodecamp/react-bootstrap';
import PropTypes from 'prop-types'; import React, { ReactElement } from 'react';
import React from 'react';
import Helmet from 'react-helmet'; import Helmet from 'react-helmet';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -11,11 +10,7 @@ import Testimonials from './components/testimonials';
import './landing.css'; import './landing.css';
const propTypes = { function Landing(): ReactElement {
page: PropTypes.string
};
export const Landing = ({ page = 'landing' }) => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
@ -25,20 +20,19 @@ export const Landing = ({ page = 'landing' }) => {
</Helmet> </Helmet>
<main className='landing-page'> <main className='landing-page'>
<Grid> <Grid>
<LandingTop pageName={page} /> <LandingTop pageName={'landing'} />
</Grid> </Grid>
<Grid fluid={true}> <Grid fluid={true}>
<AsSeenIn /> <AsSeenIn />
</Grid> </Grid>
<Grid> <Grid>
<Testimonials /> <Testimonials />
<Certifications /> <Certifications pageName={'landing'} />
</Grid> </Grid>
</main> </main>
</> </>
); );
}; }
Landing.displayName = 'Landing'; Landing.displayName = 'Landing';
Landing.propTypes = propTypes;
export default Landing; export default Landing;