<commit_before>import React, { Component } from 'react';
import Breadcrumbs from '../components/Breadcrumbs';

class MapLocations extends Component {
	constructor(props){
		super(props);
		this.state={
			selectedTraining: 'option1',
			tableRow: 3,
			tableCol: 3,
			locations: [{
				name: 'Training 1',
				address: 'Aloha State',
				times: '9:00am - 12:00pm'
			}, {
				name: 'Training 2',
				address: 'Sunshine State',
				times: '6:00pm - 8:00pm'
			}]	
		};
		this.handleOptionChange = this.handleOptionChange.bind(this);
		this.handleFormSubmit = this.handleFormSubmit.bind(this);
	}

	handleOptionChange (e){
		this.setState({selectedTraining: e.target.value});
	}

	handleFormSubmit(submit){
		submit.preventDefault();
		console.log('You signed up for', this.state.selectedTraining);
	}



	render(){
		let loc = this.state.locations;
		let info = [];
		let infoValue;
		let infoBlocks;
		let locArr = loc.map(function(data){
			let dataArr = [data];
			for (var keyValue in dataArr){
				infoValue = dataArr[keyValue];
				infoBlocks = [infoValue.name, infoValue.address, infoValue.times].join(' ');
			}
			return infoBlocks;
		});

		for (var trainings in locArr){
			info.push(<div className="loc-info" key={trainings}>{locArr[trainings]}</div>);
		}
			
		return(
			<div>
				<div>
					<Breadcrumbs/>
				</div>
				What part of the island do you want to be trained at?
				<div className="MapLocations-container">
					MAP GOES HERE
					<div>
						District: <br/>
						Place
					</div>
					<div className="location-list">
						{info}
						Name:
						Address:
						Times:
					</div>
					<div className="signup-form">
						<form onSubmit={this.handleFormSubmit}>
							<div className="radio">
								<label>
									<input type="radio" value="option1" 
										checked={this.state.selectedTraining==='option1'}
										onChange={this.handleOptionChange}
										/>
									Option 1
								</label>
							</div>
							<div className="radio">
								<label>
									<input type="radio" value="option2" 
										checked={this.state.selectedTraining==='option2'}
										onChange={this.handleOptionChange}
										/>
									Option 2
								</label>
							</div>
							<div className="radio">
								<label>
									<input type="radio" value="option3" 
									checked={this.state.selectedTraining==='option3'}
									onChange={this.handleOptionChange}
									/>
									Option 3
								</label>
							</div>
							<button type="submit">Sign Up</button>
						</form>
					</div>
				</div>
			</div>
		);
	}
}
<commit_msg>added radio values for times. checks mock data<commit_after>import React, { Component } from 'react';
import Breadcrumbs from '../components/Breadcrumbs';

class MapLocations extends Component {
	constructor(props){
		super(props);
		this.state={
			selectedTraining: '',
			tableRow: 3,
			tableCol: 3,
			locations: [{
				name: 'Training 1',
				address: 'Aloha State',
				times: '9:00am - 12:00pm'
			}, {
				name: 'Training 2',
				address: 'Sunshine State',
				times: '6:00pm - 8:00pm'
			}]	
		};
		this.handleOptionChange = this.handleOptionChange.bind(this);
		this.handleFormSubmit = this.handleFormSubmit.bind(this);
	}

	handleOptionChange (e){
		this.setState({selectedTraining: e.target.value});
	}

	handleFormSubmit(submit){
		submit.preventDefault();
		console.log('You signed up for', this.state.selectedTraining);
	}



	render(){
		let loc = this.state.locations;
		let info = [];
		let infoValue;
		let infoBlocks;
		let times = [];
		let locArr = loc.map(function(data){
			let dataArr = [data];
			for (var keyValue in dataArr){
				infoValue = dataArr[keyValue];
				infoBlocks = [infoValue.name, infoValue.address, infoValue.times].join(' ');
				times.push(infoValue.times);
			}
			return infoBlocks;
		});

		for (var trainings in locArr){
			let signUps = 
										<div className="loc-info" key={trainings}>
											{locArr[trainings]}
											<div className="radio">
												<label>
													<input type="radio" value={times[trainings]}
														checked={this.state.selectedTraining===times[trainings]} 
														onChange={this.handleOptionChange}
														/>
													{times[trainings]}
												</label>
											</div>
										</div>;
			info.push(signUps);
		}
			
		return(
			<div>
				<div>
					<Breadcrumbs/>
				</div>
				What part of the island do you want to be trained at?
				<div className="MapLocations-container">
					MAP GOES HERE
					<div>
						District: <br/>
						Place
					</div>
					<div className="location-list">
						Name:
						Address:
						Times:
					</div>
					<div className="signup-form">
						<form onSubmit={this.handleFormSubmit}>
							{info}

							<button type="submit">Sign Up</button>
						</form>
					</div>
				</div>
			</div>
		);
	}
}

{'fraction_non_alphanumeric': 0.1432688349114862, 'fraction_numerical': 0.009057225195553726, 'mean_word_length': 2.4831541218637994, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '5977517', 'n_tokens_mistral': 2263, 'n_tokens_neox': 1546, 'n_words': 337}