{"size": 888, "ext": "js", "max_stars_repo_path": "app/App.js", "max_stars_repo_name": "AdrGeorgescu/claim", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/App.js", "max_issues_repo_name": "AdrGeorgescu/claim", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/App.js", "max_forks_repo_name": "AdrGeorgescu/claim", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.1176470588, "max_line_length": 119, "alphanum_fraction": 0.5371621622}
import React from 'react';
import {BrowserRouter as Router, Link, Route, Switch} from 'react-router-dom';

import styles from './css/App.css';
export default class App extends React.Component {

    /**
     * Constructor
     * @param props
     */
    constructor(props) {
        super(props);
        this.state = {};
    }

    createGame = () => {
        let gameId = this.refs.gameId.value;
        if (gameId) {
            // TODO: init a new game
        }
    };

    render() {
        return (
            <div className="input-group">
                <input type="text" className="form-control input-lg" placeholder="Enter the game id" ref="playerName"/>
                <span className="input-group-btn">
                <Link to="/score" className="btn btn-primary btn-lg" onClick={this.createGame}>Join</Link>
              </span>
            </div>
        );
    }
}
