diff --git a/client/src/components/Footer/index.js b/client/src/components/Footer/index.js index 0b098af7bd..8b7d723df9 100644 --- a/client/src/components/Footer/index.js +++ b/client/src/components/Footer/index.js @@ -1,8 +1,8 @@ import React from 'react'; -import PropTypes from 'prop-types'; -import { Link as GatsbyLink } from 'gatsby'; import { Grid, Row, Col } from '@freecodecamp/react-bootstrap'; +import Link from '../helpers/Link'; + import './footer.css'; const propTypes = { @@ -22,23 +22,6 @@ const linkPropTypes = { to: PropTypes.string.isRequired }; -const Link = ({ children, to, external, ...other }) => { - if (!external && /^\/[^/]?/.test(to)) { - return ( - - {children} - - ); - } - - return ( - - {children} - - ); -}; -Link.propTypes = linkPropTypes; - function Footer() { return (