Components for each page created
This commit is contained in:
1 parent
d1bf136b5b
commit
8cc124ee2b
6 files changed
+56
-5
No files matched your search
@@ -5,6 +5,9 @@ import {ApolloProvider} from 'react-apollo';
|
||||
import Navbar from './components/Navbar'
|
||||
import { Route, BrowserRouter, Switch } from 'react-router-dom'
|
||||
import Home from './components/Home'
|
||||
import Profile from './components/Profile'
|
||||
import Browse from './components/Browse'
|
||||
import Search from './components/Search'
|
||||
import About from './components/About'
|
||||
import Contact from './components/Contact'
|
||||
import Post from './components/Post'
|
||||
@@ -30,6 +33,9 @@ class App extends Component {
|
||||
<Navbar />
|
||||
<Switch>
|
||||
<Route exact path='/' component={Home}/>
|
||||
<Route path='/profile' component={Profile} />
|
||||
<Route path='/browse' component={Browse} />
|
||||
<Route path='/search' component={Search} />
|
||||
<Route path='/about' component={About} />
|
||||
<Route path='/contact' component={Contact} />
|
||||
<Route path='/:post_id' component={Post} />
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import React from 'react'
|
||||
|
||||
const Browse = () => {
|
||||
return (
|
||||
<div>
|
||||
<div className="container">
|
||||
<h4 className="center">Browse</h4>
|
||||
<p>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?</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Browse
|
||||
@@ -5,15 +5,18 @@ const Navbar = (props) => {
|
||||
return (
|
||||
<nav className="nav-wrapper red darken-3">
|
||||
<div className="container">
|
||||
<Link className="brand-logo" to="/">Poke' Times</Link>
|
||||
<Link className="brand-logo" to="/">Advanced Algos Users Module</Link>
|
||||
<ul className="right">
|
||||
<li><NavLink exact to="/">Home</NavLink></li>
|
||||
<li><NavLink to='/about'>About</NavLink></li>
|
||||
<li><NavLink to='/profile'>Profile</NavLink></li>
|
||||
<li><NavLink to='/browse'>Browse</NavLink></li>
|
||||
<li><NavLink to='/search'>Search</NavLink></li>
|
||||
<li><NavLink to='/contact'>Contact</NavLink></li>
|
||||
<li><NavLink to='/about'>About</NavLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
|
||||
export default withRouter(Navbar)
|
||||
export default withRouter(Navbar)
|
||||
@@ -0,0 +1,14 @@
|
||||
import React from 'react'
|
||||
|
||||
const Profile = () => {
|
||||
return (
|
||||
<div>
|
||||
<div className="container">
|
||||
<h4 className="center">Profile</h4>
|
||||
<p>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?</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Profile
|
||||
@@ -0,0 +1,14 @@
|
||||
import React from 'react'
|
||||
|
||||
const Search = () => {
|
||||
return (
|
||||
<div>
|
||||
<div className="container">
|
||||
<h4 className="center">Search</h4>
|
||||
<p>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?</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Search
|
||||
@@ -6,7 +6,7 @@ class UserProfile extends Component {
|
||||
|
||||
displayUserProfile(){
|
||||
const {user} = this.props.data;
|
||||
console.log(user);
|
||||
|
||||
if(user){
|
||||
return(
|
||||
<div id="user-profile">
|
||||
|
||||
Reference in new issue
Block a user