-
Notifications
You must be signed in to change notification settings - Fork 318
/
Copy pathApp.js
28 lines (26 loc) · 880 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
import React, { Component } from 'react'
import LinkList from './LinkList'
import CreateLink from './CreateLink'
import Header from './Header'
import { Switch, Route, Redirect } from 'react-router-dom'
import Login from './Login'
import Search from './Search'
import '../styles/App.css'
function App() {
return (
<div className="center w85">
<Header />
<div className="ph3 pv1 background-gray">
<Switch>
<Route exact path="/" render={() => <Redirect to="/new/1" />} />
<Route exact path="/create" component={CreateLink} />
<Route exact path="/login" component={Login} />
<Route exact path="/search" component={Search} />
<Route exact path="/top" component={LinkList} />
<Route exact path="/new/:page" component={LinkList} />
</Switch>
</div>
</div>
)
}
export default App