diff options
Diffstat (limited to 'src/components/taggs')
-rw-r--r-- | src/components/taggs/TaggDraggable.tsx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx index 0d57c590..ac494a6b 100644 --- a/src/components/taggs/TaggDraggable.tsx +++ b/src/components/taggs/TaggDraggable.tsx @@ -35,6 +35,15 @@ const TaggDraggable: React.FC<TaggDraggableProps> = ( const dispatch = useDispatch(); const navigation = useNavigation(); const state: RootState = useStore().getState(); + + const gotoTaggedProfile = (userID: string) => { + //Since the logged In User is navigating to own profile, useXId is not required + navigation.navigate('Profile', { + ScreenType, + userXId: userID, + }); + }; + const { draggable, minX, @@ -69,7 +78,8 @@ const TaggDraggable: React.FC<TaggDraggableProps> = ( style={styles.container} onLayout={(event) => console.log(event.nativeEvent.layout)}> <TouchableOpacity - disabled={true} + onPressIn={() => gotoTaggedProfile(taggedUser.userId)} + disabled={false} style={[styles.button]} ref={draggableRef}> <TaggAvatar @@ -79,7 +89,7 @@ const TaggDraggable: React.FC<TaggDraggableProps> = ( userXId={undefined} /> <Text style={styles.buttonTitle}>@{taggedUser.username}</Text> - <TouchableOpacity disabled={false} onPressIn={deleteFromList()}> + <TouchableOpacity disabled={false} onPressIn={() => deleteFromList()}> <Image style={styles.imageX} source={uriX} /> </TouchableOpacity> </TouchableOpacity> |