diff options
author | Victor Chabbert <chabbertvi@eisti.eu> | 2017-05-28 23:39:12 +0200 |
---|---|---|
committer | Victor Chabbert <chabbertvi@eisti.eu> | 2017-05-28 23:39:12 +0200 |
commit | bb2ced764938c4aa6b4e003b7dedb26c8a096b97 (patch) | |
tree | 7adf701e85f724b85fe042ef9ae00ff52e3c5213 /frontend/src/layouts | |
parent | Upgrade react-scripts (diff) | |
download | seven-wonders-bb2ced764938c4aa6b4e003b7dedb26c8a096b97.tar.gz seven-wonders-bb2ced764938c4aa6b4e003b7dedb26c8a096b97.tar.bz2 seven-wonders-bb2ced764938c4aa6b4e003b7dedb26c8a096b97.zip |
Initial type checking work with flowtype
Diffstat (limited to 'frontend/src/layouts')
-rw-r--r-- | frontend/src/layouts/HomeLayout.js | 7 | ||||
-rw-r--r-- | frontend/src/layouts/LobbyLayout.js | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/frontend/src/layouts/HomeLayout.js b/frontend/src/layouts/HomeLayout.js index 613f2876..61eef427 100644 --- a/frontend/src/layouts/HomeLayout.js +++ b/frontend/src/layouts/HomeLayout.js @@ -1,14 +1,15 @@ -import React from 'react'; +// @flow +import React, { type Children } from 'react'; import { Banner } from 'rebass'; import logo from './logo-7-wonders.png'; import background from './background-zeus-temple.jpg'; import ErrorToastContainer from '../components/errors/errorToastContainer'; -export default props => ( +export default ({ children }: { children: Children }) => ( <div> <Banner align="center" backgroundImage={background}> <img src={logo} alt="Seven Wonders" /> - {props.children} + {children} </Banner> <ErrorToastContainer /> </div> diff --git a/frontend/src/layouts/LobbyLayout.js b/frontend/src/layouts/LobbyLayout.js index 27757176..865641dd 100644 --- a/frontend/src/layouts/LobbyLayout.js +++ b/frontend/src/layouts/LobbyLayout.js @@ -1,9 +1,9 @@ -import React from 'react'; +import React, { type Children } from 'react'; import { Banner } from 'rebass'; import logo from './logo-7-wonders.png'; import ErrorToastContainer from '../components/errors/errorToastContainer'; -export default props => ( +export default ({ children }: { children: Children }) => ( <div> <Banner align="center" @@ -12,7 +12,7 @@ export default props => ( > <img src={logo} alt="Seven Wonders Logo" /> </Banner> - {props.children} + {children} <ErrorToastContainer /> </div> ); |