diff options
author | George Rusu <george@tagg.id> | 2021-05-19 16:55:04 -0700 |
---|---|---|
committer | George Rusu <george@tagg.id> | 2021-05-19 16:55:04 -0700 |
commit | 73cc07e1adce4ecea0f15bd651f8db2e510c9644 (patch) | |
tree | e72fbee2eb577affbe0ad7f91de5d6c9c4067be3 /src/components/taggs | |
parent | 5ddbf16658a6e3f7bb53e78b821e62190b804cf1 (diff) |
Add delte from list, need to add rediret to profile
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> |