We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f519a0 commit 34d66a6Copy full SHA for 34d66a6
client/src/components/App.js
@@ -1,15 +1,26 @@
1
import React from 'react'
2
+import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
3
4
import Popular from './Popular.js'
5
+import Battle from './Battle.js'
6
+import Home from './Home.js'
7
+import Nav from './Nav.js'
8
+
9
+const App = props =>
10
+ (
11
+ <Router>
12
+ <div className='app'>
13
+ <Nav />
14
15
+ <Switch>
16
+ <Route exact path='/' component={Home}/>
17
+ <Route path ='/battle' component={Battle} />
18
+ <Route path ='/popular' component={Popular} />
19
+ <Route render={() => <p>NOT FOUND</p>} />
20
+ </Switch>
21
+ </div>
22
+ </Router>
23
+ )
24
-class App extends React.Component {
- render() {
- return (
- <div className="popular">
- <Popular />
- </div>
- )
- }
-}
25
26
export default App
0 commit comments