blob: 7ac31da0e300f63aa29a13374f5358d1352bec74 (
plain)
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
38
39
40
|
import React, { Component } from 'react'
import { Link } from 'react-router-dom'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { Loader } from '../../../common'
import actions from '../../../actions'
// import * as uploadActions from './upload.actions'
class GraphIndex extends Component {
componentDidMount() {
actions.graph.index()
}
render() {
const { index } = this.props
if (index.loading) {
return (
<div className='graphIndex'>
<Loader />
</div>
)
}
return (
<div className='graphIndex'>
<b>welcome, swimmer</b>
<Link to='/index/new'>+ new project</Link>
</div>
)
}
}
const mapStateToProps = state => ({
index: state.graph.index,
})
const mapDispatchToProps = dispatch => ({
// uploadActions: bindActionCreators({ ...uploadActions }, dispatch),
})
export default connect(mapStateToProps, mapDispatchToProps)(GraphIndex)
|