Skip to content

Commit

Permalink
Merge pull request #422 from SquareTable/move-comments-into-its-own-c…
Browse files Browse the repository at this point in the history
…omponent

added navigate to profile screen for comments
  • Loading branch information
Sebastian-Webster authored Jul 2, 2024
2 parents 52c22e2 + f733184 commit deb052f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/Comments/CommentItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ class CommentClass extends Component {
}
})

navigateToProfileScreen = () => {
this.props.navigation.push('ProfilePages', {pubId: this.props.comment.commenterPubId})
}

render() {
return (
<>
Expand All @@ -136,10 +140,10 @@ class CommentClass extends Component {
<View style={{flexDirection: 'row', borderColor: this.props.colors.darkest, borderTopWidth: 3, paddingBottom: 8}}>
<View style={{flexGrow: 1}}>
<View style={{justifyContent: 'flex-start', alignItems: 'center', flexDirection: 'row'}}>
<TouchableOpacity>
<TouchableOpacity onPress={this.navigateToProfileScreen}>
<CommenterIcon source={{uri: this.props.comment.commenterImageB64}}/>
</TouchableOpacity>
<TouchableOpacity>
<TouchableOpacity onPress={this.navigateToProfileScreen}>
<CommenterName style={{color: this.props.colors.tertiary}} displayName={true}>{this.props.comment.commenterDisplayName}</CommenterName>
<CommenterName>@{this.props.comment.commenterName}</CommenterName>
</TouchableOpacity>
Expand Down

0 comments on commit deb052f

Please sign in to comment.