import React, { Component } from 'react' import { Link } from 'react-router-dom' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { Loader } from 'app/common' import actions from 'app/actions' // import * as uploadActions from './upload.actions' class GraphIndex extends Component { componentDidMount() { actions.graph.index() } render() { const { index } = this.props // console.log(this.props) if (!index.order) { return (
) } // console.log(state) return (
welcome, swimmer + new project
{index.order.map(id => { const graph = index.lookup[id] return (
{graph.title} {'edit project'}
) })}
) } } const mapStateToProps = state => ({ index: state.graph.index, }) const mapDispatchToProps = dispatch => ({ // uploadActions: bindActionCreators({ ...uploadActions }, dispatch), }) export default connect(mapStateToProps, mapDispatchToProps)(GraphIndex)