App.js
1000 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 { BrowserRouter, Route } from 'react-router-dom'
import { connect } from 'react-redux'
import * as actions from '../actions'
import './App.css'
import Header from './Header'
import Landing from './Landing'
import Dashboard from './/Dashboard'
// const Dashboard = () => <h2>Dashboard</h2>
const SurveyNew = () => <h2>SurveyNew</h2>
class App extends Component {
componentDidMount () {
this.props.fetchUser()
}
render () {
return (
<div className='App'>
<div>
<BrowserRouter>
<div>
<Header />
<Route exact path='/' component={Landing} />
<Route exact path='/surveys' component={Dashboard} />
<Route path='/surveys/new' component={SurveyNew} />
{/* <Route path='/mapstart' component={MapStart} /> */}
</div>
</BrowserRouter>
</div>
</div>
)
}
}
export default connect(null, actions)(App)