Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added Component PostForm to add post in your feed.
  • Loading branch information
ganesh-deshmukh committed Dec 3, 2018
1 parent 6164958 commit 7013f1e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/App.js
Expand Up @@ -18,6 +18,7 @@ import AddExperience from "./components/add-credentials/AddExperience";
import AddEducation from "./components/add-credentials/AddEducation";
import Profiles from "./components/profiles/Profiles";
import Profile from "./components/profile/Profile";
import Posts from "./components/posts/Posts";

import PrivateRoute from "./components/common/PrivateRoute";
import NotFound from "./components/not-found/NotFound";
Expand Down Expand Up @@ -93,9 +94,9 @@ class App extends Component {
/>
</Switch>
<Switch>
<Route exact path="/not-found" component={NotFound} />
<Route component={NotFound} />
<PrivateRoute exact path="/feed" component={Posts} />
</Switch>
<Route exact path="/not-found" component={NotFound} />
</div>
<Footer />
</div>
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/components/layout/Navbar.js
Expand Up @@ -18,6 +18,11 @@ class Navbar extends Component {

const authLinks = (
<ul className="navbar-nav ml-auto">
<li className="nav-item">
<Link className="nav-link" to="/feed">
Post Feed
</Link>
</li>
<li className="nav-item">
<Link className="nav-link" to="/register">
Dashboard
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/posts/PostForm.js
@@ -0,0 +1,7 @@
import React, { Component } from "react";

export default class PostForm extends Component {
render() {
return <div />;
}
}
22 changes: 22 additions & 0 deletions frontend/src/components/posts/Posts.js
@@ -0,0 +1,22 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import PostForm from "./PostForm";
import Spinner from "../common/Spinner";

class Posts extends Component {
render() {
return (
<div className="feed">
<div className="container">
<div className="row">
<div className="col-md-12" />
<PostForm />
</div>
</div>
</div>
);
}
}

export default Posts;

0 comments on commit 7013f1e

Please sign in to comment.