Skip to content

Commit

Permalink
Vote buttons now disappear when changing vote for image posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Jan 13, 2024
1 parent 8738000 commit bc106a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Posts/ImagePost.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class ImagePost extends Component {
<PostHorizontalView style={{marginLeft: '5%', width: '90%', paddingVertical: 10, flex: 1, flexDirection: 'row'}}>

<PostsIconFrame onPress={() => this.props.post.upvoted ? this.removeVote("Up") : this.upvote()}>
<PostsIcons style={{flex: 1, tintColor: this.props.post.upvoted ? this.props.colors.brand : this.props.colors.tertiary}} source={require('../../assets/icomoon-icons/IcoMoon-Free-master/PNG/64px/322-circle-up.png')}/>
{!this.props.post.changingVote && <PostsIcons style={{flex: 1, tintColor: this.props.post.upvoted ? this.props.colors.brand : this.props.colors.tertiary}} source={require('../../assets/icomoon-icons/IcoMoon-Free-master/PNG/64px/322-circle-up.png')}/>}
</PostsIconFrame>

<PostsIconFrame>
Expand All @@ -204,7 +204,7 @@ class ImagePost extends Component {
</PostsIconFrame>

<PostsIconFrame onPress={() => this.props.post.downvoted ? this.removeVote("Down") : this.downvote()}>
<PostsIcons style={{flex: 1, tintColor: this.props.post.downvoted ? this.props.colors.brand : this.props.colors.tertiary}} source={require('../../assets/icomoon-icons/IcoMoon-Free-master/PNG/64px/324-circle-down.png')}/>
{!this.props.post.changingVote && <PostsIcons style={{flex: 1, tintColor: this.props.post.downvoted ? this.props.colors.brand : this.props.colors.tertiary}} source={require('../../assets/icomoon-icons/IcoMoon-Free-master/PNG/64px/324-circle-down.png')}/>}
</PostsIconFrame>

<PostsIconFrame></PostsIconFrame>
Expand Down

0 comments on commit bc106a6

Please sign in to comment.