From 49cb7351438314336e38b6c801899340f0c764c0 Mon Sep 17 00:00:00 2001 From: duogenesis <136373989+duogenesis@users.noreply.github.com> Date: Sat, 28 Oct 2023 18:15:20 +1100 Subject: [PATCH] Conversation screen: Don't users tap 'Unavailable user' --- components/conversation-screen.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/components/conversation-screen.tsx b/components/conversation-screen.tsx index 9665d391..73b7df4b 100644 --- a/components/conversation-screen.tsx +++ b/components/conversation-screen.tsx @@ -110,14 +110,16 @@ const ConversationScreen = ({navigation, route}) => { }, [personId, messages]); const onPressName = useCallback(() => { - navigation.navigate( - 'Prospect Profile Screen', - { - screen: 'Prospect Profile', - params: { personId, showBottomButtons: false }, - } - ); - }, [personId, name]); + if (isAvailableUser) { + navigation.navigate( + 'Prospect Profile Screen', + { + screen: 'Prospect Profile', + params: { personId, showBottomButtons: false }, + } + ); + } + }, [isAvailableUser, personId, name]); const maybeLoadNextPage = useCallback(async () => { if (hasFetchedAll.current) {