import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { Grid, Row, Col } from '@freecodecamp/react-bootstrap';
import Helmet from 'react-helmet';
import Link from '../helpers/Link';
import { CurrentChallengeLink, FullWidthRow, Spacer } from '../helpers';
import Camper from './components/Camper';
import HeatMap from './components/HeatMap';
import Certifications from './components/Certifications';
import Portfolio from './components/Portfolio';
import Timeline from './components/TimeLine';
const propTypes = {
isSessionUser: PropTypes.bool,
user: PropTypes.shape({
profileUI: PropTypes.shape({
isLocked: PropTypes.bool,
showAbout: PropTypes.bool,
showCerts: PropTypes.bool,
showHeatMap: PropTypes.bool,
showLocation: PropTypes.bool,
showName: PropTypes.bool,
showPoints: PropTypes.bool,
showPortfolio: PropTypes.bool,
showTimeLine: PropTypes.bool
}),
calendar: PropTypes.object,
streak: PropTypes.shape({
current: PropTypes.number,
longest: PropTypes.number
}),
completedChallenges: PropTypes.array,
portfolio: PropTypes.array,
about: PropTypes.string,
githubProfile: PropTypes.string,
isGithub: PropTypes.bool,
isLinkedIn: PropTypes.bool,
isTwitter: PropTypes.bool,
isWebsite: PropTypes.bool,
linkedin: PropTypes.string,
location: PropTypes.string,
name: PropTypes.string,
picture: PropTypes.string,
points: PropTypes.number,
twitter: PropTypes.string,
username: PropTypes.string,
website: PropTypes.string,
yearsTopContributor: PropTypes.array
})
};
function renderMessage(isSessionUser, username) {
return isSessionUser ? (
You have not made your profile public.
You need to change your privacy setting in order for your profile to
be seen by others. This is a preview of how your profile will look
when made public.
) : (
{username} has not made their profile public.
{username} needs to change their privacy setting in order for you to
view their profile.