From e642c814728ad60164bbf74ecb91b7fec9a64c16 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Tue, 7 Nov 2017 17:25:35 +0100 Subject: [PATCH] Add post container, component and route --- src/components/App.js | 3 ++- src/components/Post.js | 9 +++++++++ src/containers/PostContainer.js | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/components/Post.js create mode 100644 src/containers/PostContainer.js diff --git a/src/components/App.js b/src/components/App.js index 2c76682..c6d6081 100644 --- a/src/components/App.js +++ b/src/components/App.js @@ -1,7 +1,7 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; import { Home, About, Portfolio, Resume, NotFoundPage } from '.'; -import { BlogContainer } from '../containers'; +import { BlogContainer, PostContainer } from '../containers'; export const App = () => (
@@ -9,6 +9,7 @@ export const App = () => ( + diff --git a/src/components/Post.js b/src/components/Post.js new file mode 100644 index 0000000..01424ae --- /dev/null +++ b/src/components/Post.js @@ -0,0 +1,9 @@ +import React, {Component} from 'react'; + +export default class Post extends Component { + render() { + return ( +
Hello
+ ) + } +} diff --git a/src/containers/PostContainer.js b/src/containers/PostContainer.js new file mode 100644 index 0000000..18b0678 --- /dev/null +++ b/src/containers/PostContainer.js @@ -0,0 +1,20 @@ +import React, {Component} from 'react'; +import axios from 'axios'; +import {Post} from '../components'; + +export default class PostContainer extends Component { + constructor() { + super(); + + this.state = { + isLoading: true, + }; + } + + render() { + return ( + + ) + } +}