import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Button, Container, Input } from 'rebass'; import { actions } from '../../redux/players'; import HomeLayout from './components/HomeLayout'; class SplashScreen extends Component { play = e => { if (this._username !== undefined) { this.props.chooseUsername(this._username); } }; render() { return ( (this._username = e.target.value)} /> ); } } const mapStateToProps = state => ({}); const mapDispatchToProps = { chooseUsername: actions.chooseUsername, }; export default connect(mapStateToProps, mapDispatchToProps)(SplashScreen);