diff options
author | Brian Kim <brian@tagg.id> | 2021-05-19 17:26:40 -0700 |
---|---|---|
committer | Brian Kim <brian@tagg.id> | 2021-05-19 17:26:40 -0700 |
commit | 6e09b4245f3a96560ca0eb74d46e8fd40a164f44 (patch) | |
tree | 586c72d05e2a8d73012aa5c1497df371e5f8a43f /src/components | |
parent | 73cc07e1adce4ecea0f15bd651f8db2e510c9644 (diff) |
Fix redirect
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/profile/TaggAvatar.tsx | 2 | ||||
-rw-r--r-- | src/components/taggs/TaggDraggable.tsx | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/src/components/profile/TaggAvatar.tsx b/src/components/profile/TaggAvatar.tsx index 8ccae2ef..8cd52a2f 100644 --- a/src/components/profile/TaggAvatar.tsx +++ b/src/components/profile/TaggAvatar.tsx @@ -23,6 +23,8 @@ const TaggAvatar: React.FC<TaggAvatarProps> = ({ userXId, editable = false, }) => { + const state = useSelector((state: RootState) => state); + console.log('STATE', state.userX); const {avatar, user} = useSelector((state: RootState) => userXId ? state.userX[screenType][userXId] : state.user, ); diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx index ac494a6b..06185bd1 100644 --- a/src/components/taggs/TaggDraggable.tsx +++ b/src/components/taggs/TaggDraggable.tsx @@ -79,19 +79,23 @@ const TaggDraggable: React.FC<TaggDraggableProps> = ( onLayout={(event) => console.log(event.nativeEvent.layout)}> <TouchableOpacity onPressIn={() => gotoTaggedProfile(taggedUser.userId)} - disabled={false} + disabled={redirect} style={[styles.button]} ref={draggableRef}> <TaggAvatar style={styles.avatar} screenType={ScreenType.Profile} editable={false} - userXId={undefined} + userXId={taggedUser.userId} /> <Text style={styles.buttonTitle}>@{taggedUser.username}</Text> - <TouchableOpacity disabled={false} onPressIn={() => deleteFromList()}> - <Image style={styles.imageX} source={uriX} /> - </TouchableOpacity> + {redirect && ( + <TouchableOpacity + disabled={false} + onPressIn={() => deleteFromList()}> + <Image style={styles.imageX} source={uriX} /> + </TouchableOpacity> + )} </TouchableOpacity> </View> </TouchableWithoutFeedback> |