From 0187200d794d54c1d9954dd86a6a156132dedcac Mon Sep 17 00:00:00 2001 From: ankit-thanekar007 Date: Mon, 22 Mar 2021 12:18:12 -0700 Subject: TMA 642 Touchable Opacity redirection --- src/components/profile/Content.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/profile/Content.tsx') 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 = ({y, userXId, screenType}) => { isBlocked, }} /> - + {userXId && moments.length === 0 && ( -- cgit v1.2.3-70-g09d2 From 81b97d55e0b65e1df51cf65871d69e32ae48b5d0 Mon Sep 17 00:00:00 2001 From: ankit-thanekar007 Date: Tue, 23 Mar 2021 11:59:00 -0700 Subject: User not present check --- src/components/notifications/Notification.tsx | 45 ++++++++++++++++++++------- src/components/profile/Content.tsx | 12 ++++--- 2 files changed, 41 insertions(+), 16 deletions(-) (limited to 'src/components/profile/Content.tsx') diff --git a/src/components/notifications/Notification.tsx b/src/components/notifications/Notification.tsx index c8a8aa06..8143e396 100644 --- a/src/components/notifications/Notification.tsx +++ b/src/components/notifications/Notification.tsx @@ -205,11 +205,22 @@ const Notification: React.FC = (props) => { dispatch(loadUserNotifications()); }; + const isOwnProfile = id === loggedInUser.userId; + const navigateToProfile = async () => { + if (!userXInStore(state, screenType, id)) { + await fetchUserX(dispatch, {userId: id, username: username}, screenType); + } + navigation.navigate('Profile', { + userXId: isOwnProfile ? undefined : id, + screenType, + }); + }; + const renderContent = () => ( - - + + = (props) => { : require('../../assets/images/avatar-placeholder.png') } /> - + - - {first_name} {last_name} - - {verbage} + + + {first_name} {last_name} + + + + {verbage} + {notification_type === 'FRD_REQ' && ( @@ -238,9 +253,13 @@ const Notification: React.FC = (props) => { notification_type === 'MOM_3+' || notification_type === 'MOM_FRIEND') && notification_object && ( - + + + )} - + ); return unread ? ( @@ -284,7 +303,6 @@ const styles = StyleSheet.create({ fontWeight: '700', }, moment: { - position: 'absolute', height: 42, width: 42, right: '5%', @@ -292,6 +310,9 @@ const styles = StyleSheet.create({ buttonsContainer: { height: '80%', }, + imageFlex: { + flex: 1, + }, }); export default Notification; diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index 7f922bd9..1a5a205c 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -109,9 +109,10 @@ const Content: React.FC = ({y, userXId, screenType}) => { const [isStageOnePromptClosed, setIsStageOnePromptClosed] = useState( false, ); - const [isStageThreePromptClosed, setIsStageThreePromptClosed] = useState< - boolean - >(false); + const [ + isStageThreePromptClosed, + setIsStageThreePromptClosed, + ] = useState(false); const onRefresh = useCallback(() => { const refrestState = async () => { @@ -308,7 +309,10 @@ const Content: React.FC = ({y, userXId, screenType}) => { isBlocked, }} /> - + {userXId && moments.length === 0 && ( -- cgit v1.2.3-70-g09d2