diff --git a/client/src/client-only-routes/ShowUnsubscribed.js b/client/src/client-only-routes/ShowUnsubscribed.js index 9bfcf9788e..e0cf948ab0 100644 --- a/client/src/client-only-routes/ShowUnsubscribed.js +++ b/client/src/client-only-routes/ShowUnsubscribed.js @@ -5,7 +5,7 @@ import Helmet from 'react-helmet'; import { useTranslation } from 'react-i18next'; import envData from '../../../config/env.json'; -import FullWidthRow from '../components/helpers/FullWidthRow'; +import FullWidthRow from '../components/helpers/full-width-row'; import { Spacer } from '../components/helpers'; const { apiLocation } = envData; diff --git a/client/src/components/helpers/FullWidthRow.js b/client/src/components/helpers/full-width-row.tsx similarity index 63% rename from client/src/components/helpers/FullWidthRow.js rename to client/src/components/helpers/full-width-row.tsx index b55d3fdbf0..dfb3d4de31 100644 --- a/client/src/components/helpers/FullWidthRow.js +++ b/client/src/components/helpers/full-width-row.tsx @@ -1,8 +1,13 @@ import React from 'react'; -import PropTypes from 'prop-types'; import { Row, Col } from '@freecodecamp/react-bootstrap'; -function FullWidthRow({ children, className }) { +function FullWidthRow({ + children, + className +}: { + children?: React.ReactNode; + className?: string; +}): JSX.Element { return ( @@ -13,9 +18,5 @@ function FullWidthRow({ children, className }) { } FullWidthRow.displayName = 'FullWidthRow'; -FullWidthRow.propTypes = { - children: PropTypes.any, - className: PropTypes.string -}; export default FullWidthRow; diff --git a/client/src/components/helpers/index.js b/client/src/components/helpers/index.js index bf538bfd60..8e91c441f7 100644 --- a/client/src/components/helpers/index.js +++ b/client/src/components/helpers/index.js @@ -1,5 +1,5 @@ export { default as ButtonSpacer } from './ButtonSpacer'; -export { default as FullWidthRow } from './FullWidthRow'; +export { default as FullWidthRow } from './full-width-row'; export { default as SlimWidthRow } from './slim-width-row'; export { default as Loader } from './loader'; export { default as SkeletonSprite } from './skeleton-sprite'; diff --git a/client/src/components/profile/components/HeatMap.js b/client/src/components/profile/components/HeatMap.js index 1842e52861..689bc1633c 100644 --- a/client/src/components/profile/components/HeatMap.js +++ b/client/src/components/profile/components/HeatMap.js @@ -9,7 +9,7 @@ import startOfDay from 'date-fns/startOfDay'; import isEqual from 'date-fns/isEqual'; import { useTranslation } from 'react-i18next'; -import FullWidthRow from '../../helpers/FullWidthRow'; +import FullWidthRow from '../../helpers/full-width-row'; import Spacer from '../../helpers/spacer'; import '@freecodecamp/react-calendar-heatmap/dist/styles.css'; diff --git a/client/src/components/settings/Email.js b/client/src/components/settings/Email.js index f2e910e723..137e153d11 100644 --- a/client/src/components/settings/Email.js +++ b/client/src/components/settings/Email.js @@ -17,7 +17,7 @@ import { Trans, withTranslation } from 'react-i18next'; import { updateMyEmail } from '../../redux/settings'; import { maybeEmailRE } from '../../utils'; -import FullWidthRow from '../helpers/FullWidthRow'; +import FullWidthRow from '../helpers/full-width-row'; import Spacer from '../helpers/spacer'; import SectionHeader from './SectionHeader'; import BlockSaveButton from '../helpers/form/BlockSaveButton'; diff --git a/client/src/components/settings/Privacy.js b/client/src/components/settings/Privacy.js index 4f52a195b8..bcb1386b51 100644 --- a/client/src/components/settings/Privacy.js +++ b/client/src/components/settings/Privacy.js @@ -9,7 +9,7 @@ import { withTranslation } from 'react-i18next'; import { userSelector } from '../../redux'; import { submitProfileUI } from '../../redux/settings'; -import FullWidthRow from '../helpers/FullWidthRow'; +import FullWidthRow from '../helpers/full-width-row'; import Spacer from '../helpers/spacer'; import ToggleSetting from './ToggleSetting'; import SectionHeader from './SectionHeader'; diff --git a/client/src/components/settings/SectionHeader.js b/client/src/components/settings/SectionHeader.js index e34f728bd0..ee38bba238 100644 --- a/client/src/components/settings/SectionHeader.js +++ b/client/src/components/settings/SectionHeader.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -import FullWidthRow from '../helpers/FullWidthRow'; +import FullWidthRow from '../helpers/full-width-row'; const propTypes = { children: PropTypes.oneOfType([ diff --git a/client/src/components/settings/Username.js b/client/src/components/settings/Username.js index 0c7e95838e..9a6f53ed4a 100644 --- a/client/src/components/settings/Username.js +++ b/client/src/components/settings/Username.js @@ -17,7 +17,7 @@ import { submitNewUsername } from '../../redux/settings'; import BlockSaveButton from '../helpers/form/BlockSaveButton'; -import FullWidthRow from '../helpers/FullWidthRow'; +import FullWidthRow from '../helpers/full-width-row'; import { isValidUsername } from '../../../../utils/validate'; const propTypes = { diff --git a/client/src/templates/Introduction/Intro.js b/client/src/templates/Introduction/Intro.js index 76b91ce963..1406a28978 100644 --- a/client/src/templates/Introduction/Intro.js +++ b/client/src/templates/Introduction/Intro.js @@ -6,7 +6,7 @@ import { Grid, ListGroup, ListGroupItem } from '@freecodecamp/react-bootstrap'; import { useTranslation } from 'react-i18next'; import LearnLayout from '../../components/layouts/Learn'; -import FullWidthRow from '../../components/helpers/FullWidthRow'; +import FullWidthRow from '../../components/helpers/full-width-row'; import ButtonSpacer from '../../components/helpers/ButtonSpacer'; import { MarkdownRemark, AllChallengeNode } from '../../redux/prop-types';