import { connect } from 'react-redux' ; import Redux from 'redux' ; import { setDialog } from '../../actions/Dialog' ; import { syncMultiplayer } from '../../actions/Multiplayer' ; import { AppState , DialogIDType } from '../../reducers/StateTypes' ; import MultiplayerFooter , { DispatchProps , Props , StateProps } from './MultiplayerFooter' ; const mapStateToProps = ( state , ownProps ) : StateProps => { return { multiplayer : state . multiplayer , cardTheme : ownProps . cardTheme || 'light' , questTheme : state . quest . details . theme || 'base' , } ; } ; const mapDispatchToProps = ( dispatch ) : DispatchProps => { return { setDialog : ( name ) => { dispatch ( setDialog ( name ) ) ; } , onSync : ( ) => { dispatch ( syncMultiplayer ( ) ) ; } , } ; } ; const MultiplayerFooterContainer = connect ( mapStateToProps , mapDispatchToProps ) ( MultiplayerFooter ) ; export default MultiplayerFooterContainer ;