diff options
Diffstat (limited to 'frontend/src/scenes')
-rw-r--r-- | frontend/src/scenes/SplashScreen/components/HomeLayout.js | 18 | ||||
-rw-r--r-- | frontend/src/scenes/SplashScreen/components/background-zeus-temple.jpg | bin | 571089 -> 0 bytes | |||
-rw-r--r-- | frontend/src/scenes/SplashScreen/components/logo-7-wonders.png | bin | 301442 -> 0 bytes | |||
-rw-r--r-- | frontend/src/scenes/SplashScreen/index.js | 45 | ||||
-rw-r--r-- | frontend/src/scenes/index.js | 6 |
5 files changed, 3 insertions, 66 deletions
diff --git a/frontend/src/scenes/SplashScreen/components/HomeLayout.js b/frontend/src/scenes/SplashScreen/components/HomeLayout.js deleted file mode 100644 index c9950f44..00000000 --- a/frontend/src/scenes/SplashScreen/components/HomeLayout.js +++ /dev/null @@ -1,18 +0,0 @@ -// @flow -import type { Node } from 'react'; -import React from 'react'; -import { ErrorToastContainer } from '../../../components/errors/errorToastContainer'; -import background from './background-zeus-temple.jpg'; -import logo from './logo-7-wonders.png'; - -export type HomeLayoutProps = { - children?: Node, -} - -export const HomeLayout = ({children}: HomeLayoutProps) => ( - <div style={{backgroundImage: `url(${background})`}}> - <img src={logo} alt="Seven Wonders"/> - {children} - <ErrorToastContainer/> - </div> -); diff --git a/frontend/src/scenes/SplashScreen/components/background-zeus-temple.jpg b/frontend/src/scenes/SplashScreen/components/background-zeus-temple.jpg Binary files differdeleted file mode 100644 index 5a28e933..00000000 --- a/frontend/src/scenes/SplashScreen/components/background-zeus-temple.jpg +++ /dev/null diff --git a/frontend/src/scenes/SplashScreen/components/logo-7-wonders.png b/frontend/src/scenes/SplashScreen/components/logo-7-wonders.png Binary files differdeleted file mode 100644 index 96974d3e..00000000 --- a/frontend/src/scenes/SplashScreen/components/logo-7-wonders.png +++ /dev/null diff --git a/frontend/src/scenes/SplashScreen/index.js b/frontend/src/scenes/SplashScreen/index.js deleted file mode 100644 index 1eee4e1b..00000000 --- a/frontend/src/scenes/SplashScreen/index.js +++ /dev/null @@ -1,45 +0,0 @@ -// @flow -import { Button, Classes, InputGroup, Intent } from '@blueprintjs/core'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { actions } from '../../redux/players'; -import { HomeLayout } from './components/HomeLayout'; - -export type SplashScreenProps = { - chooseUsername: (username: string) => void, -} - -class SplashScreenPresenter extends Component<SplashScreenProps> { - _username = ''; - - play = e => { - e.preventDefault(); - if (this._username !== undefined) { - this.props.chooseUsername(this._username); - } - }; - - render() { - return ( - <HomeLayout> - <form onSubmit={this.play}> - <InputGroup - placeholder="Username" - onChange={e => (this._username = e.target.value)} - rightElement={this.renderSubmit()} - /> - </form> - </HomeLayout> - ); - } - - renderSubmit = () => ( - <Button className={Classes.MINIMAL} onClick={this.play} intent={Intent.PRIMARY} rightIcon="arrow-right" /> - ); -} - -const mapDispatchToProps = { - chooseUsername: actions.chooseUsername, -}; - -export const SplashScreen = connect(null, mapDispatchToProps)(SplashScreenPresenter); diff --git a/frontend/src/scenes/index.js b/frontend/src/scenes/index.js index eb15e626..c708c9a9 100644 --- a/frontend/src/scenes/index.js +++ b/frontend/src/scenes/index.js @@ -2,13 +2,13 @@ import React from 'react'; import { Redirect, Route, Switch } from 'react-router-dom'; import { GameBrowser } from '../components/game-browser/GameBrowser'; import { Lobby } from './Lobby'; -import { SplashScreen } from './SplashScreen'; +import { Home } from '../components/home/Home'; export const Application = () => ( <Switch> - <Route path="/splash-screen" component={SplashScreen} /> <Route path="/games" component={GameBrowser} /> <Route path="/lobby" component={Lobby} /> - <Redirect from="*" to="/splash-screen" /> + <Route path="/" component={Home} /> + <Redirect to="/" /> </Switch> ); |