import React from 'react'; import PropTypes from 'prop-types'; import { Link, Spacer, Loader, FullWidthRow } from '../helpers'; import { Row, Col } from '@freecodecamp/react-bootstrap'; import { apiLocation } from '../../../config/env.json'; import { randomQuote } from '../../utils/get-words'; import './intro.css'; const propTypes = { complete: PropTypes.bool, isSignedIn: PropTypes.bool, name: PropTypes.string, navigate: PropTypes.func, pending: PropTypes.bool, slug: PropTypes.string, username: PropTypes.string }; function Intro({ isSignedIn, username, name, navigate, pending, complete, slug }) { if (pending && !complete) { return ( <> ); } else if (isSignedIn) { const { quote, author } = randomQuote(); return ( <>

{name ? 'Welcome back, ' + name + '.' : 'Welcome to freeCodeCamp.org'}

View my Portfolio Update my account settings
{quote}
{author}

If you are new to coding, we recommend you{' '} start at the beginning.

); } else { return ( <>

Welcome to freeCodeCamp.org

Learn to code.

Build projects.

Earn certifications.

Since 2014, more than 40,000 freeCodeCamp.org graduates have gotten jobs at tech companies including:

Apple

Google

Amazon

Microsoft

Spotify

); } } Intro.propTypes = propTypes; Intro.displayName = 'Intro'; export default Intro;