-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
37 lines (32 loc) · 1001 Bytes
/
Copy pathApp.js
File metadata and controls
37 lines (32 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React, { Component } from 'react';
import Header from './components/header/Header'
import Home from './views/Home'
import Articles from './views/Articles'
import SearchResults from './views/SearchResults'
import Bookmarks from './views/Bookmarks'
import { Switch, Route } from 'react-router-dom'
class App extends Component {
render() {
return (
<div style={style.appContainer}>
<Header />
<div>
<Switch>
<Route path="/bookmarks/:uid" component={ Bookmarks } />
<Route path="/search/:query/:page" component={ SearchResults } />
<Route path="/article/:url" component={ Articles } />
<Route exact path="/" component= {Home } />
<Route path="/:section" component={ Home } />
{/* <Route path="/articles" component={ Articles } /> */}
</Switch>
</div>
</div>
);
}
}
const style = {
appContainer : {
width: '100%'
}
}
export default App;