From 83b74d14f3db506b2271caf1cffadee394493c56 Mon Sep 17 00:00:00 2001 From: Bouncey Date: Fri, 14 Sep 2018 16:14:35 +0100 Subject: [PATCH] feat(titles): Title the pages --- client/src/client-only-routes/ShowSettings.js | 4 ++++ client/src/client-only-routes/ShowUnsubscribed.js | 8 ++++++++ client/src/client-only-routes/ShowUser.js | 4 ++++ client/src/pages/404.js | 3 +++ client/src/pages/academic-honesty.js | 4 ++++ client/src/pages/accept-privacy-terms.js | 2 +- client/src/pages/index.js | 4 ++++ client/src/pages/software-resources-for-nonprofits.js | 9 ++++++++- client/src/pages/update-email.js | 4 ++++ client/src/pages/welcome.js | 8 +++++--- 10 files changed, 45 insertions(+), 5 deletions(-) diff --git a/client/src/client-only-routes/ShowSettings.js b/client/src/client-only-routes/ShowSettings.js index 962cef94e7..ec352ac071 100644 --- a/client/src/client-only-routes/ShowSettings.js +++ b/client/src/client-only-routes/ShowSettings.js @@ -4,6 +4,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { Grid, Button } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import { signInLoadingSelector, userSelector } from '../redux'; import { submitNewAbout, updateUserFlag } from '../redux/settings'; @@ -77,6 +78,9 @@ function ShowSettings(props) { return ( + + Settings | freeCodeCamp.org + diff --git a/client/src/client-only-routes/ShowUnsubscribed.js b/client/src/client-only-routes/ShowUnsubscribed.js index 308dac9791..2636f23d93 100644 --- a/client/src/client-only-routes/ShowUnsubscribed.js +++ b/client/src/client-only-routes/ShowUnsubscribed.js @@ -1,5 +1,7 @@ import React from 'react'; +import PropTypes from 'prop-types'; import { Grid, Panel, Button } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import env from '../../config/env.json'; import Layout from '../components/Layout'; @@ -11,6 +13,9 @@ const { apiLocation } = env; function ShowUnsubscribed({ unsubscribeId }) { return ( + + You have been unsubscribed | freeCodeCamp.org + @@ -39,5 +44,8 @@ function ShowUnsubscribed({ unsubscribeId }) { } ShowUnsubscribed.displayName = 'ShowUnsubscribed'; +ShowUnsubscribed.propTypes = { + unsubscribeId: PropTypes.string +}; export default ShowUnsubscribed; diff --git a/client/src/client-only-routes/ShowUser.js b/client/src/client-only-routes/ShowUser.js index 3fe655dbb1..84ee551c2f 100644 --- a/client/src/client-only-routes/ShowUser.js +++ b/client/src/client-only-routes/ShowUser.js @@ -12,6 +12,7 @@ import { Button, Col } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import { isSignedInSelector, @@ -134,6 +135,9 @@ class ShowUser extends Component { return ( + + Report a users profile | freeCodeCamp.org + diff --git a/client/src/pages/404.js b/client/src/pages/404.js index 380e49faaa..cd810a0348 100644 --- a/client/src/pages/404.js +++ b/client/src/pages/404.js @@ -1,8 +1,11 @@ import React from 'react'; +import Helmet from 'react-helmet'; + import Layout from '../components/Layout'; const NotFoundPage = () => ( + 404 Page not found | freeCodeCamp.org

NOT FOUND

You just hit a route that doesn't exist... the sadness.

diff --git a/client/src/pages/academic-honesty.js b/client/src/pages/academic-honesty.js index c00445565e..e977c3985f 100644 --- a/client/src/pages/academic-honesty.js +++ b/client/src/pages/academic-honesty.js @@ -1,5 +1,6 @@ import React from 'react'; import { Grid } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import Layout from '../components/Layout'; import Spacer from '../components/helpers/Spacer'; @@ -8,6 +9,9 @@ import FullWidthRow from '../components/helpers/FullWidthRow'; function AcademicHonesty() { return ( + + Academic Honesty Policy | freeCodeCamp.org + diff --git a/client/src/pages/accept-privacy-terms.js b/client/src/pages/accept-privacy-terms.js index 5066b005e6..2892ceb45e 100644 --- a/client/src/pages/accept-privacy-terms.js +++ b/client/src/pages/accept-privacy-terms.js @@ -73,7 +73,7 @@ class AcceptPrivacyTerms extends Component { return ( - Privacy Policy and Terms of Service + Privacy Policy and Terms of Service | freeCodeCamp.org diff --git a/client/src/pages/index.js b/client/src/pages/index.js index 006959e675..868686b7b8 100644 --- a/client/src/pages/index.js +++ b/client/src/pages/index.js @@ -10,6 +10,7 @@ import { faReact } from '@fortawesome/free-brands-svg-icons'; import { faDatabase } from '@fortawesome/free-solid-svg-icons'; +import Helmet from 'react-helmet'; import { Spacer } from '../components/helpers'; import Layout from '../components/Layout'; @@ -27,6 +28,9 @@ const BigCallToAction = () => ( const IndexPage = () => ( + + Learn to code | freeCodeCamp.org + diff --git a/client/src/pages/software-resources-for-nonprofits.js b/client/src/pages/software-resources-for-nonprofits.js index e9366a6250..a312cbf71a 100644 --- a/client/src/pages/software-resources-for-nonprofits.js +++ b/client/src/pages/software-resources-for-nonprofits.js @@ -1,5 +1,6 @@ import React from 'react'; import { Grid } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import Layout from '../components/Layout'; import FullWidthRow from '../components/helpers/FullWidthRow'; @@ -8,6 +9,9 @@ import { Spacer } from '../components/helpers'; function SoftwareResourcesForNonProfits() { return ( + + Software Resources for Nonprofits | freeCodeCamp.org + @@ -148,7 +152,10 @@ function SoftwareResourcesForNonProfits() {
  • diff --git a/client/src/pages/update-email.js b/client/src/pages/update-email.js index 1a55d5b278..8cd6735af7 100644 --- a/client/src/pages/update-email.js +++ b/client/src/pages/update-email.js @@ -14,6 +14,7 @@ import { Col, Button } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import Layout from '../components/Layout'; import { Spacer } from '../components/helpers'; @@ -80,6 +81,9 @@ class UpdateEmail extends Component { const { isNewEmail, updateMyEmail } = this.props; return ( + + Update your email address | freeCodeCamp.org +

    Update your email address here:

    diff --git a/client/src/pages/welcome.js b/client/src/pages/welcome.js index b305080a05..dbbed63f3a 100644 --- a/client/src/pages/welcome.js +++ b/client/src/pages/welcome.js @@ -5,6 +5,7 @@ import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { Grid, Row, Col, Button } from '@freecodecamp/react-bootstrap'; +import Helmet from 'react-helmet'; import { Loader, Spacer } from '../components/helpers'; import Layout from '../components/Layout'; @@ -38,7 +39,6 @@ const mapDispatchToProps = dispatch => bindActionCreators({}, dispatch); function Welcome({ fetchState: { pending, complete }, - fetchState, user: { acceptedPrivacyTerms, name = '', @@ -48,7 +48,6 @@ function Welcome({ completedLegacyCertCount = 0 } }) { - console.log(fetchState); if (pending && !complete) { return ( @@ -67,6 +66,9 @@ function Welcome({ const { quote, author } = randomQuote(); return ( + + Welcome {name ? name : 'Camper'} | freeCodeCamp.org + @@ -131,7 +133,7 @@ function Welcome({ - + );