diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2018-04-30 01:33:32 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2018-04-30 01:33:32 +0200 |
commit | d81f17d9487ad67353b7fa30b3ef5b7d81f404d6 (patch) | |
tree | 5060f40004d5b1c5387b233827292d14a154acba /frontend/src/scenes/SplashScreen | |
parent | Remove unused former LobbyLayout... RIP (diff) | |
download | seven-wonders-d81f17d9487ad67353b7fa30b3ef5b7d81f404d6.tar.gz seven-wonders-d81f17d9487ad67353b7fa30b3ef5b7d81f404d6.tar.bz2 seven-wonders-d81f17d9487ad67353b7fa30b3ef5b7d81f404d6.zip |
Add flow prop types in scene components
Diffstat (limited to 'frontend/src/scenes/SplashScreen')
-rw-r--r-- | frontend/src/scenes/SplashScreen/components/HomeLayout.js | 8 | ||||
-rw-r--r-- | frontend/src/scenes/SplashScreen/index.js | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/frontend/src/scenes/SplashScreen/components/HomeLayout.js b/frontend/src/scenes/SplashScreen/components/HomeLayout.js index 2a3fd856..08029d45 100644 --- a/frontend/src/scenes/SplashScreen/components/HomeLayout.js +++ b/frontend/src/scenes/SplashScreen/components/HomeLayout.js @@ -1,12 +1,16 @@ // @flow -import type { Children } from 'react'; +import type { Node } from 'react'; import React from 'react'; import { Banner } from 'rebass'; import { ErrorToastContainer } from '../../../components/errors/errorToastContainer'; import background from './background-zeus-temple.jpg'; import logo from './logo-7-wonders.png'; -export const HomeLayout = ({ children }: { children: Children }) => ( +export type HomeLayoutProps = { + children?: Node, +} + +export const HomeLayout = ({ children }: HomeLayoutProps) => ( <div> <Banner align="center" backgroundImage={background}> <img src={logo} alt="Seven Wonders" /> diff --git a/frontend/src/scenes/SplashScreen/index.js b/frontend/src/scenes/SplashScreen/index.js index 022caf45..745d8ee7 100644 --- a/frontend/src/scenes/SplashScreen/index.js +++ b/frontend/src/scenes/SplashScreen/index.js @@ -6,7 +6,11 @@ import { Container } from 'rebass'; import { actions } from '../../redux/players'; import { HomeLayout } from './components/HomeLayout'; -class SplashScreenPresenter extends Component { +export type SplashScreenProps = { + chooseUsername: (username: string) => void, +} + +class SplashScreenPresenter extends Component<SplashScreenProps> { _username = ''; play = e => { |