summaryrefslogtreecommitdiff
path: root/frontend/src/scenes
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/scenes')
-rw-r--r--frontend/src/scenes/Lobby/index.js51
-rw-r--r--frontend/src/scenes/index.js14
2 files changed, 0 insertions, 65 deletions
diff --git a/frontend/src/scenes/Lobby/index.js b/frontend/src/scenes/Lobby/index.js
deleted file mode 100644
index b0b9adac..00000000
--- a/frontend/src/scenes/Lobby/index.js
+++ /dev/null
@@ -1,51 +0,0 @@
-//@flow
-import { Button } from '@blueprintjs/core';
-import { List } from 'immutable';
-import React, { Component } from 'react';
-import { connect } from 'react-redux';
-import { PlayerList } from '../../components/PlayerList';
-import type { Game } from '../../models/games';
-import type { Player } from '../../models/players';
-import { actions, getCurrentGame } from '../../redux/games';
-import { getPlayers } from '../../redux/players';
-
-export type LobbyProps = {
- currentGame: Game,
- players: List<Player>,
- startGame: () => void,
-}
-
-class LobbyPresenter extends Component<LobbyProps> {
- getTitle() {
- if (this.props.currentGame) {
- return this.props.currentGame.name + ' — Lobby';
- } else {
- return 'What are you doing here? You haven\'t joined a game yet!';
- }
- }
-
- render() {
- return (
- <div>
- <h2>{this.getTitle()}</h2>
- <PlayerList players={this.props.players} />
- <Button onClick={this.props.startGame}>Start Game</Button>
- </div>
- );
- }
-}
-
-const mapStateToProps = state => {
- const game = getCurrentGame(state.get('games'));
- console.info(game);
- return {
- currentGame: game,
- players: game ? getPlayers(state.get('players'), game.players) : new List(),
- };
-};
-
-const mapDispatchToProps = {
- startGame: actions.requestStartGame,
-};
-
-export const Lobby = connect(mapStateToProps, mapDispatchToProps)(LobbyPresenter);
diff --git a/frontend/src/scenes/index.js b/frontend/src/scenes/index.js
deleted file mode 100644
index c708c9a9..00000000
--- a/frontend/src/scenes/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-import { Redirect, Route, Switch } from 'react-router-dom';
-import { GameBrowser } from '../components/game-browser/GameBrowser';
-import { Lobby } from './Lobby';
-import { Home } from '../components/home/Home';
-
-export const Application = () => (
- <Switch>
- <Route path="/games" component={GameBrowser} />
- <Route path="/lobby" component={Lobby} />
- <Route path="/" component={Home} />
- <Redirect to="/" />
- </Switch>
-);
bgstack15