-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
35 lines (31 loc) · 892 Bytes
/
App.js
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
import React, { Component } from 'react';
import { HashRouter as Router, Route } from 'react-router-dom';
import CountryDetail from './Components/CountryDetail';
import CountryList from './Components/CountryList';
import Sports from './Components/Sports';
import GoldMedalList from './Components/GoldMedalList';
import Search from './Components/Search';
class App extends Component {
render() {
return (
<Router>
<div id="container">
<Search />
<Route path="/country/:countryName" component={ props => (
<div>
<CountryDetail {...props}/>
<GoldMedalList {...props}/>
<Sports {...props}/>
</div>
)} />
<Route exact path="/" component={ props => (
<div>
<CountryList {...props}/>
</div>
)} />
</div>
</Router>
);
}
}
export default App;