From 39407ba1a92d557ebeccea4590d37b1eef309281 Mon Sep 17 00:00:00 2001 From: Joffrey BION Date: Sun, 29 Apr 2018 13:23:24 +0200 Subject: Cleanup index.js files --- frontend/src/scenes/Games/index.js | 65 -------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 frontend/src/scenes/Games/index.js (limited to 'frontend/src/scenes/Games') diff --git a/frontend/src/scenes/Games/index.js b/frontend/src/scenes/Games/index.js deleted file mode 100644 index a2031030..00000000 --- a/frontend/src/scenes/Games/index.js +++ /dev/null @@ -1,65 +0,0 @@ -// @flow -import type { List } from 'immutable'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { InlineForm, Space, Text } from 'rebass'; -import { Flex } from 'reflexbox'; -import GameList from '../../components/gameList'; -import type { Games } from '../../models/games'; -import type { Player } from '../../models/players'; -import { actions, getAllGames } from '../../redux/games'; -import { getCurrentPlayer } from '../../redux/players'; - -class GameBrowser extends Component { - props: { - currentPlayer: Player, - games: List, - createGame: (gameName: string) => void, - joinGame: (gameId: string) => void - }; - - _gameName: string | void = undefined; - - createGame = (e: SyntheticEvent): void => { - e.preventDefault(); - if (this._gameName !== undefined) { - this.props.createGame(this._gameName); - } - }; - - render() { - return ( -
- - (this._gameName = e.target.value)} - onClick={this.createGame} - /> - - - Username: - {' '} - {this.props.currentPlayer && this.props.currentPlayer.displayName} - - - - -
- ); - } -} - -const mapStateToProps = state => ({ - currentPlayer: getCurrentPlayer(state.get('players')), - games: getAllGames(state.get('games')), -}); - -const mapDispatchToProps = { - createGame: actions.requestCreateGame, - joinGame: actions.requestJoinGame, -}; - -export default connect(mapStateToProps, mapDispatchToProps)(GameBrowser); -- cgit