Created
March 19, 2017 14:45
-
-
Save brookslyrette/a725d0b57aeb9ab4d40fbd9f65a37942 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import { BrowserRouter, Route, Link } from 'react-router-dom'; | |
import FrontPageContainer from './containers/FrontPageContainer.js'; | |
import SubredditPageContainer from './containers/SubredditPageContainer.js'; | |
import DefaultRedditsContainer from './containers/DefaultRedditsContainer.js' | |
const App = (props) => ( | |
<BrowserRouter> | |
<div className="App container-fluid"> | |
<div className="App-reddit-selector"> | |
<Link to="/">Front</Link> - <Link to="/r/all">All</Link> | | |
<DefaultRedditsContainer /> | |
</div> | |
<div className="App-header"> | |
<img src={logo} className="App-logo" alt="logo" /> | |
<strong>Reactit!</strong> An Example ReactJs Reddit front-end | |
</div> | |
<Route exact path="/" component={FrontPageContainer}/> | |
<Route path="/r/:name" component={SubredditPageContainer} /> | |
</div> | |
</BrowserRouter> | |
); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment