import React, { Component } from 'react';
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import {
	TargetsCalendarView
} from 'components'
import targetActions from 'redux/modules/actions/targetActions'

const mapStateToProps = (state) => ({
	target : state.target
});
const mapDispatchToProps = (dispatch) => ({
  targetActions: bindActionCreators(Object.assign({}, targetActions), dispatch)
});
export class CreateTargetView extends Component {
	constructor(props) {
		super(props);
	}
	componentDidMount() {
		let requestObject = {}
		this.props.targetActions.getTargetTypesAPI(requestObject)
	}
	render() {
		// console.log('CreateTargetView props', this.props.targetActions);
		let {target, ...other} = this.props
		let events = target.targetList
		return (
			<div className='row'>
				<div>
					<TargetsCalendarView {...this.props}/>
				</div>
			</div>
		);
	}
}

export default connect(mapStateToProps, mapDispatchToProps)(CreateTargetView)