From 0b338e0c243c63fc836c7a9829ef3787045bc034 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Mon, 10 May 2021 16:28:37 -0400 Subject: added navigation to "Likes" screen --- src/components/comments/CommentTile.tsx | 9 ++++++++- src/components/profile/Friends.tsx | 28 +++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) (limited to 'src/components') diff --git a/src/components/comments/CommentTile.tsx b/src/components/comments/CommentTile.tsx index 8074a015..688a16e6 100644 --- a/src/components/comments/CommentTile.tsx +++ b/src/components/comments/CommentTile.tsx @@ -169,7 +169,14 @@ const CommentTile: React.FC = ({ {' ' + timePosted} - {}}> + { + navigation.navigate('CommentReactionScreen', { + comment: commentObject, + screenType: screenType, + }); + }}> {commentObject.reaction_count} diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index a7a06567..c9d8e6ae 100644 --- a/src/components/profile/Friends.tsx +++ b/src/components/profile/Friends.tsx @@ -21,9 +21,15 @@ interface FriendsProps { result: Array; screenType: ScreenType; userId: string | undefined; + hideSubheader?: boolean; } -const Friends: React.FC = ({result, screenType, userId}) => { +const Friends: React.FC = ({ + result, + screenType, + userId, + hideSubheader, +}) => { const state: RootState = useStore().getState(); const dispatch = useDispatch(); const {user: loggedInUser = NO_USER} = state.user; @@ -85,14 +91,16 @@ const Friends: React.FC = ({result, screenType, userId}) => { {loggedInUser.userId === userId && usersFromContacts.length !== 0 && ( - Contacts on Tagg + Contacts on Tagg )} - - Friends - + {!hideSubheader && ( + + Friends + + )}