import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import moment from 'moment'; import { Link } from 'react-router'; import Nav from '../../../components/Nav'; import * as SketchActions from '../actions'; import * as ProjectActions from '../../IDE/actions/project'; class SketchListView extends React.Component { componentDidMount() { this.props.getProjects(); } render() { return (
); } } SketchListView.propTypes = { user: PropTypes.object.isRequired, newProject: PropTypes.func.isRequired, saveProject: PropTypes.func.isRequired, getProjects: PropTypes.func.isRequired, sketches: PropTypes.array.isRequired, exportProjectAsZip: PropTypes.func.isRequired, cloneProject: PropTypes.func.isRequired }; function mapStateToProps(state) { return { user: state.user, sketches: state.sketches }; } function mapDispatchToProps(dispatch) { return bindActionCreators(Object.assign({}, SketchActions, ProjectActions), dispatch); } export default connect(mapStateToProps, mapDispatchToProps)(SketchListView);