<commit_before>import React from 'react';

export default class CreateTask extends React.Component {
	render(){
		return(
			<p>New Task</p>
		)
	}
}<commit_msg>Add google maps initial map and task form<commit_after>import React from 'react';
import GoogleMapsLoader from 'google-maps'
import axios from 'axios'
import {hashHistory} from 'react-router'

export default class CreateTask extends React.Component {
	componentWillMount() {
		GoogleMapsLoader.KEY = process.env.GOOGLE_MAPS_API_KEY
		GoogleMapsLoader.load((google) => {
			new google.maps.Map(document.getElementById('map'), {
				center: {
					lat: 40.7413549,
					lng: -73.9980244
				},
				zoom: 13
			});
		})   
	}

	handleClick(){
		let data = {
			name: this.refs.name.value,
			price: this.refs.price.value,
			description: this.refs.description.value
		}
		axios.post('users/' + this.props.params.id + '/tasks', data).then(() => {
			hashHistory.push('/')
		})
	}
	render(){
		return(
			<div>
				<h3>New Task</h3>
				<div id="map" /><br />
				<div className="form-group">
					<label for="exampleInputName2">Task Name</label>
					<input type="text" className="form-control" ref="name" placeholder="Pick up my laundry"/>
				</div>
				<div className="form-group">
					<label for="exampleInputEmail2">Description</label>
					<textarea className="form-control" ref="description" placeholder="Description" />
				</div>
				<div className="form-group">
					<label for="exampleInputEmail2">Price</label>
					<input type="number" className="form-control col-sm-2" ref="price" placeholder="Price($)" />
				</div>
				<button onClick={this.handleClick.bind(this)} className="btn btn-primary">Call A Serf</button><br /><br />
			</div>
		)
	}
}
{'fraction_non_alphanumeric': 0.16230366492146597, 'fraction_numerical': 0.015125072716695753, 'mean_word_length': 3.7645429362880884, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917349', 'n_tokens_mistral': 676, 'n_tokens_neox': 555, 'n_words': 120}