Skip to content

Commit

Permalink
Merge pull request #2884 from ecency/nt/voters-list-fix
Browse files Browse the repository at this point in the history
Nt/voters list fix
  • Loading branch information
feruzm authored Jun 7, 2024
2 parents 64d9a86 + 3428e71 commit a95a0b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const UserListItem = ({
>
<View style={[styles.voteItemWrapper, index % 2 === 1 && styles.voteItemWrapperGray]}>
{leftItemRenderer && leftItemRenderer()}
{itemIndex && <Text style={styles.itemIndex}>{itemIndex}</Text>}
{!!itemIndex && <Text style={styles.itemIndex}>{itemIndex}</Text>}
<UserAvatar noAction={true} style={styles.avatar} username={username} />
<View style={styles.userDescription}>
{!searchValue && <Text style={styles.name}>{text || username}</Text>}
Expand Down Expand Up @@ -80,7 +80,7 @@ const UserListItem = ({
<Text style={[styles.date, descriptionStyle]}>{description}</Text>
)}
</View>
{middleText && (
{!!middleText && (
<View style={styles.middleWrapper}>
<Text
style={[
Expand Down Expand Up @@ -132,7 +132,7 @@ const UserListItem = ({
>
{rightText}
</Text>
{subRightText && <Text style={styles.text}>{subRightText}</Text>}
{!!subRightText && <Text style={styles.text}>{subRightText}</Text>}
</>
</TouchableOpacity>
<Popover
Expand Down
2 changes: 1 addition & 1 deletion src/components/votersDisplay/view/votersDisplayView.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const VotersDisplayView = ({ votes, createdAt = '2010-01-01T00:00:00' }) => {

const _renderItem = ({ item, index }) => {
const value = item.reward && `$ ${item.reward}`;
const percent = item.percent100 && `${item.percent100}%`;
const percent = !isNaN(item.percent100) && `${item.percent100}%`;

// snippet to avoid rendering time form long past
const minTimestamp = new Date(createdAt).getTime();
Expand Down

0 comments on commit a95a0b9

Please sign in to comment.