<commit_before>import React, {Component} from 'react';
import HotelsList from './HotelsList';
import Hotel from './Hotel';
import 'whatwg-fetch';

const API_URL = 'https://hotel-project-ajboyle.c9users.io/api/locations/';
const API_HEADERS = {
    'Content-Type': 'application/json'
};

//Get information from user regarding city, checkin and checkout dates. 
class GetRates extends Component {
    
    handleSubmit(event){
        let city = event.target.city.value;
        let checkin = event.target.checkin.value;
        let checkout = event.target.checkout.value;
        this.props.taskCallbacks.getHotelsSearch(city, checkin, checkout);
        event.preventDefault();
    }
    render(){
        
        return (
            <div className="searchBox">
            <h3 className="searchHotels">Search Hotels</h3>
            <form ref="formRates" className="formRates" onSubmit={this.handleSubmit.bind(this)}>
                <label>City
                <select name="city" id="city">
                    <option value='charlottesville'>Charlottesville</option>
                    <option value='newyork'>New York City</option>
                    <option value='chicago'>Chicago</option>
                </select>
                </label>
                <label>Check In
                <input type='text' name='checkin' id='checkin' placeholder='YYYY-MM-DD' required />
                </label>
                <label>Check Out<commit_msg>added clearHotel to submit<commit_after>import React, {Component} from 'react';
import HotelsList from './HotelsList';
import Hotel from './Hotel';
import 'whatwg-fetch';

const API_URL = 'https://hotel-project-ajboyle.c9users.io/api/locations/';
const API_HEADERS = {
    'Content-Type': 'application/json'
};

//Get information from user regarding city, checkin and checkout dates. 
class GetRates extends Component {
    
    handleSubmit(event){
        let city = event.target.city.value;
        let checkin = event.target.checkin.value;
        let checkout = event.target.checkout.value;
        this.props.taskCallbacks.clearHotel;
        this.props.taskCallbacks.getHotelsSearch(city, checkin, checkout);
        event.preventDefault();
    }
    render(){
        
        return (
            <div className="searchBox">
            <h3 className="searchHotels">Search Hotels</h3>
            <form ref="formRates" className="formRates" onSubmit={this.handleSubmit.bind(this)}>
                <label>City
                <select name="city" id="city">
                    <option value='charlottesville'>Charlottesville</option>
                    <option value='newyork'>New York City</option>
                    <option value='chicago'>Chicago</option>
                </select>
                </label>
                <label>Check In
                <input type='text' name='checkin' id='checkin' placeholder='YYYY-MM-DD' required />
                </label>
                <label>Check Out
{'fraction_non_alphanumeric': 0.12280701754385964, 'fraction_numerical': 0.0020242914979757085, 'mean_word_length': 2.272626931567329, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 2, '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': '7525612', 'n_tokens_mistral': 844, 'n_tokens_neox': 809, 'n_words': 175}