aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/profile/TaggAvatar.tsx2
-rw-r--r--src/components/taggs/TaggDraggable.tsx14
-rw-r--r--src/screens/profile/CaptionScreen.tsx11
-rw-r--r--src/screens/profile/DraggableNoPress.tsx0
4 files changed, 20 insertions, 7 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>
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 37003207..f72b1165 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -36,6 +36,7 @@ import {mentionPartTypes} from '../../utils/comments';
import TaggDraggable from '../../components/taggs/TaggDraggable';
import Draggable from '../../components/common/Draggable';
+import {UserType} from 'src/types';
/**
* Upload Screen to allow users to upload posts to Tagg
@@ -75,6 +76,12 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
const [curStart, setCurStart] = useState([0, 0]);
const [dim, setDim] = useState([0, 0]);
+ const testUser: UserType = {
+ // userId: '1216bbb4-f778-4ef3-b7f8-a55bde1ab1a1',
+ userId: 'ID-1234-567',
+ username: 'dragonofthewest',
+ };
+
const navigateToProfile = () => {
//Since the logged In User is navigating to own profile, useXId is not required
navigation.navigate('Profile', {
@@ -175,8 +182,8 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
minY={0}
maxX={50}
maxY={50}
- taggedUser={user}
- redirect={true}
+ taggedUser={testUser}
+ redirect={false}
deleteFromList={() => console.log('Hello world')}
setStart={setCurStart}
/>
diff --git a/src/screens/profile/DraggableNoPress.tsx b/src/screens/profile/DraggableNoPress.tsx
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/screens/profile/DraggableNoPress.tsx