Skip to content

Instantly share code, notes, and snippets.

@quicksnap
Forked from steamIngenius/Voting.jsx
Last active April 8, 2016 23:07
Show Gist options
  • Save quicksnap/1cefe51c13ac674ff29b164163e14ac7 to your computer and use it in GitHub Desktop.
Save quicksnap/1cefe51c13ac674ff29b164163e14ac7 to your computer and use it in GitHub Desktop.
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