-
-
Save quicksnap/1cefe51c13ac674ff29b164163e14ac7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux'; | |
import Vote from './Vote'; | |
import Winner from './Winner'; | |
export default function Voting(props) { | |
return ( | |
<div className="voting"> | |
{!!props.winner ? | |
<Winner winner={props.winner} /> : | |
<Vote {...props} /> | |
} | |
</div> | |
); | |
} | |
export const VotingContainer = connect(state => ({ | |
pair: state.getIn(['vote', 'pair']), | |
winner: state.get('winner') | |
}))(Voting); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment