React App
diff --git a/client/src/App.js b/client/src/App.js
index 9864ce2e0..360dc840e 100644
--- a/client/src/App.js
+++ b/client/src/App.js
@@ -2,6 +2,13 @@ import React, { Component } from 'react';
import ApolloClient from 'apollo-boost';
import {ApolloProvider} from 'react-apollo';
+import Navbar from './components/Navbar'
+import { Route, BrowserRouter, Switch } from 'react-router-dom'
+import Home from './components/Home'
+import About from './components/About'
+import Contact from './components/Contact'
+import Post from './components/Post'
+
// Components
import UserList from './components/UserList';
diff --git a/client/src/actions/postActions.js b/client/src/actions/postActions.js
new file mode 100644
index 000000000..a3d838e2a
--- /dev/null
+++ b/client/src/actions/postActions.js
@@ -0,0 +1,6 @@
+export const deletePost = (id) => {
+ return {
+ type: 'DELETE_POST',
+ id
+ }
+}
\ No newline at end of file
diff --git a/client/src/components/About.js b/client/src/components/About.js
new file mode 100644
index 000000000..5283ad55d
--- /dev/null
+++ b/client/src/components/About.js
@@ -0,0 +1,14 @@
+import React from 'react'
+
+const About = () => {
+ return (
+
+
+
About
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae repudiandae repellat illo magni eligendi cupiditate voluptates eius nam voluptate. Incidunt nihil ullam quae quia officia quaerat, deserunt eligendi explicabo totam?
+
+
+ )
+}
+
+export default About
diff --git a/client/src/components/Contact.js b/client/src/components/Contact.js
new file mode 100644
index 000000000..07bdb5692
--- /dev/null
+++ b/client/src/components/Contact.js
@@ -0,0 +1,14 @@
+import React from 'react'
+
+const Contact = () => {
+ return (
+
+
+
Contact
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae repudiandae repellat illo magni eligendi cupiditate voluptates eius nam voluptate. Incidunt nihil ullam quae quia officia quaerat, deserunt eligendi explicabo totam?
+
+
+ )
+}
+
+export default Contact
diff --git a/client/src/components/Home.js b/client/src/components/Home.js
new file mode 100644
index 000000000..cb1f79b04
--- /dev/null
+++ b/client/src/components/Home.js
@@ -0,0 +1,44 @@
+import React, { Component } from 'react'
+import { Link } from 'react-router-dom'
+import Pokeball from '../pokeball.png'
+import { connect } from 'react-redux'
+
+class Home extends Component {
+ render(){
+ const { posts } = this.props
+ const postList = posts.length ? (
+ posts.map(post => {
+ return (
+
+
+
+
+ {post.title}
+
+
{post.body}
+
+
+ )
+ })
+ ) : (
+
No posts to show
+ );
+
+ return (
+
+
+
Home
+ {postList}
+
+
+ )
+ }
+}
+
+const mapStateToProps = (state) => {
+ return {
+ posts: state.posts
+ }
+}
+
+export default connect(mapStateToProps)(Home)
\ No newline at end of file
diff --git a/client/src/components/Navbar.js b/client/src/components/Navbar.js
new file mode 100644
index 000000000..7c0dd514a
--- /dev/null
+++ b/client/src/components/Navbar.js
@@ -0,0 +1,19 @@
+import React from 'react';
+import { Link, NavLink, withRouter } from 'react-router-dom'
+
+const Navbar = (props) => {
+ return (
+
+ )
+}
+
+export default withRouter(Navbar)
\ No newline at end of file
diff --git a/client/src/components/Post.js b/client/src/components/Post.js
new file mode 100644
index 000000000..8ae8e1de1
--- /dev/null
+++ b/client/src/components/Post.js
@@ -0,0 +1,47 @@
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import { deletePost } from '../actions/postActions'
+
+class Post extends Component {
+ handleClick = () => {
+ this.props.deletePost(this.props.post.id);
+ this.props.history.push('/');
+ }
+ render() {
+
+ const post = this.props.post ? (
+