{"size": 636, "ext": "js", "max_stars_repo_path": "src/components/User/MyOrders.js", "max_stars_repo_name": "amiratak88/eatup-client", "max_stars_repo_stars_event_min_datetime": "2019-04-03T09:55:36.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-03T09:55:36.000Z", "max_issues_repo_path": "src/components/User/MyOrders.js", "max_issues_repo_name": "amiratak88/eatup-client", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/User/MyOrders.js", "max_forks_repo_name": "amiratak88/eatup-client", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.2, "max_line_length": 50, "alphanum_fraction": 0.679245283}
import React, { Component } from 'react'
import { Container } from 'semantic-ui-react'
import MyOrder from './MyOrder'
import UserNav from './UserNav'
import { connect } from 'react-redux'

class myOrders extends Component {

	getOrders() {
		return this.props.orders.map(order => {
			return <MyOrder key={order.id} order={order} />
		})
	}

	render() {
		console.log("MyOrders PROPS", this.props)
		return (
			<Container>
				<UserNav history={this.props.history}/>
				{this.getOrders()}
			</Container>
		)
	}
}

const mapStateToProps = (state) => ({
	orders: state.user.orders
})

export default connect(mapStateToProps)(myOrders)