-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
30 lines (29 loc) · 1.25 KB
/
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
import './App.css';
import React, { Component } from 'react'
import Navbar from './components/Navbar';
import News from './components/News';
import {
BrowserRouter as Router,
Switch,
Route
} from "react-router-dom";
export default class App extends Component {
render() {
return (
<div>
<Router>
<Navbar/>
<Switch>
<Route exact path="/"><News country="in" pageSize={12} category="general" key="general"/></Route>
<Route exact path="/"><News country="in" pageSize={12} category="general" key="general"/></Route>
<Route exact path="/business"><News country="in" pageSize={12} category="business" key="business"/></Route>
<Route exact path="/entertainment"><News country="in" pageSize={12} category="entertainment" key="entertainment"/></Route>
<Route exact path="/science"><News country="in" pageSize={12} category="science" key="science"/></Route>
<Route exact path="/sports"><News country="in" pageSize={12} category="sports" key="sports"/></Route>
<Route exact path="/technology"><News country="in" pageSize={12} category="technology" key="technology"/></Route>
</Switch>
</Router>
</div>
)
}
}