Skip to content

Commit fcb28a0

Browse files
committed
Add /about route
1 parent 829f015 commit fcb28a0

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

src/App.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
/*
2-
* This component houses the routes of our app
3-
* Routes determine the component to show when a url is visited
4-
*
5-
* Activity:
6-
* Create an additional route that leads to another component.
7-
*
8-
* When your done, create a branch on our repository and push your code. :)
9-
*
10-
* Reference: https://reacttraining.com/react-router/core/guides/philosophy
11-
*/
121
import React, { Component } from "react";
132
import { BrowserRouter, Switch, Route } from "react-router-dom";
143
import Home from "components/Home/Home";
154
import Navbar from "components/Elements/Navbar/Navbar";
5+
import About from "components/About/About";
166
import ProfileCard from "components/Profile/ProfileCard";
177
import ProfileForm from "components/Profile/ProfileForm";
8+
189
class App extends Component {
1910
render() {
2011
return (
@@ -23,6 +14,7 @@ class App extends Component {
2314
<Navbar />
2415
<Switch>
2516
<Route exact path="/" component={Home} />
17+
<Route exact path="/about" component={About} />
2618
<Route exact path="/profile-card" component={ProfileCard} />
2719
<Route exact path="/profile-form" component={ProfileForm} />
2820
</Switch>

src/components/About/About.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import PageContent from "components/Elements/PageContent";
3+
4+
const About = () => {
5+
return (
6+
<PageContent
7+
title="About Us"
8+
description="Wouldn't you like to know?"
9+
>
10+
</PageContent>
11+
);
12+
};
13+
14+
export default About;

src/components/Profile/ProfileCard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import PageContent from "components/Elements/PageContent";
1919
const ProfileCard = () => {
2020
return (
2121
<PageContent
22-
title="My Profile Card"
23-
description="Our first React component!"
22+
title="Barbarocks"
23+
description="Wizarding web dev and proud of it"
2424
>
2525
<div className="columns is-centered">
2626
<div className="column is-narrow is-half">

0 commit comments

Comments
 (0)