Change icon if draw

This commit is contained in:
Arnaud Vergnet 2020-04-09 17:42:41 +02:00
parent d032b80158
commit 88478c15b5

View file

@ -52,6 +52,7 @@ class VoteResults extends React.Component<Props> {
resultRenderItem = ({item}: Object) => { resultRenderItem = ({item}: Object) => {
const isWinner = this.winnerIds.indexOf(item.id) !== -1; const isWinner = this.winnerIds.indexOf(item.id) !== -1;
const isDraw = this.winnerIds.length > 1;
return ( return (
<Card style={{ <Card style={{
marginTop: 10, marginTop: 10,
@ -61,7 +62,7 @@ class VoteResults extends React.Component<Props> {
title={item.name} title={item.name}
description={item.votes + ' ' + i18n.t('voteScreen.results.votes')} description={item.votes + ' ' + i18n.t('voteScreen.results.votes')}
left={props => isWinner left={props => isWinner
? <List.Icon {...props} icon="trophy" color={this.colors.primary}/> ? <List.Icon {...props} icon={isDraw ? "trophy-outline" : "trophy"} color={this.colors.primary}/>
: null} : null}
titleStyle={{ titleStyle={{
color: isWinner color: isWinner