From 1ae1359fc2a28230101817fe8037d6fd95e9109f Mon Sep 17 00:00:00 2001 From: George Rusu Date: Tue, 18 May 2021 17:01:13 -0700 Subject: fix draggable userID prop --- src/components/taggs/TaggDraggable.tsx | 15 ++++++++------- src/screens/profile/CaptionScreen.tsx | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx index a0872c2d..2c7ae2ce 100644 --- a/src/components/taggs/TaggDraggable.tsx +++ b/src/components/taggs/TaggDraggable.tsx @@ -59,9 +59,9 @@ const TaggDraggable: React.FC = ( {/* user profile pic */} {/* @username */} = ( taggedUser, ) }> - {taggedUser} + {taggedUser.userId} {/* x button */} @@ -89,6 +89,7 @@ const TaggDraggable: React.FC = ( if (draggable) { return ( + {console.log("this guy's userid is: " + taggedUser.userId)} = ( }}> - {taggedUser} + {taggedUser.userId} deleteFromList()}> @@ -112,7 +113,7 @@ const TaggDraggable: React.FC = ( - {taggedUser} + {taggedUser.userId} deleteFromList()}> diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index 50b60024..3fd2e7ef 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -46,10 +46,10 @@ interface CaptionScreenProps { const CaptionScreen: React.FC = ({route, navigation}) => { const {title, image, screenType} = route.params; + const {user} = useSelector((state: RootState) => state.user); const { user: {userId}, } = useSelector((state: RootState) => state.user); - console.log(userId); const dispatch = useDispatch(); const [caption, setCaption] = useState(''); const [loading, setLoading] = useState(false); -- cgit v1.2.3-70-g09d2