diff options
author | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-22 12:18:12 -0700 |
---|---|---|
committer | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-23 12:06:00 -0700 |
commit | 0187200d794d54c1d9954dd86a6a156132dedcac (patch) | |
tree | ff498f2703eb8037b550af4f03c895401ed72f8f /src | |
parent | 33c107f7382955f6993d8415f08262f51060d178 (diff) |
TMA 642 Touchable Opacity redirection
Diffstat (limited to 'src')
-rw-r--r-- | src/components/moments/MomentPostHeader.tsx | 20 | ||||
-rw-r--r-- | src/components/profile/Content.tsx | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/src/components/moments/MomentPostHeader.tsx b/src/components/moments/MomentPostHeader.tsx index aad776e8..56b073d6 100644 --- a/src/components/moments/MomentPostHeader.tsx +++ b/src/components/moments/MomentPostHeader.tsx @@ -1,5 +1,11 @@ import React, {useState} from 'react'; -import {StyleSheet, Text, View, ViewProps} from 'react-native'; +import { + StyleSheet, + Text, + TouchableOpacity, + View, + ViewProps, +} from 'react-native'; import {MomentMoreInfoDrawer} from '../profile'; import {loadUserMoments} from '../../store/actions'; import {useDispatch, useSelector} from 'react-redux'; @@ -29,17 +35,23 @@ const MomentPostHeader: React.FC<MomentPostHeaderProps> = ({ (state: RootState) => state.user.user, ); const isOwnProfile = loggedInUserName === username; - return ( <View style={[styles.container, style]}> - <View style={styles.header}> + <TouchableOpacity + onPress={() => { + navigation.navigate('Profile', { + userXId: isOwnProfile ? undefined : userXId, + screenType, + }); + }} + style={styles.header}> <Avatar style={styles.avatar} userXId={userXId} screenType={screenType} /> <Text style={styles.headerText}>{username}</Text> - </View> + </TouchableOpacity> <MomentMoreInfoDrawer isOpen={drawerVisible} setIsOpen={setDrawerVisible} diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index d4c50d5c..7f922bd9 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -308,7 +308,7 @@ const Content: React.FC<ContentProps> = ({y, userXId, screenType}) => { isBlocked, }} /> - <TaggsBar {...{y, profileBodyHeight, userXId, screenType}} /> + <TaggsBar {...{y, profileBodyHeight, userXId, screenType}} whiteRing = {undefined}/> <View style={styles.momentsContainer}> {userXId && moments.length === 0 && ( <View style={styles.plusIconContainer}> |