From 097b515066f1a0c38cb7fb69cf78b16b945594e5 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 31 Mar 2021 18:29:33 -0400 Subject: fixed bug --- src/components/taggs/Tagg.tsx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx index ddb9c264..5d26539b 100644 --- a/src/components/taggs/Tagg.tsx +++ b/src/components/taggs/Tagg.tsx @@ -74,20 +74,22 @@ const Tagg: React.FC = ({ */ const modalOrAuthBrowserOrPass = async () => { - if (youMayPass && canViewProfile(state, userXId, screenType)) { - if (INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1) { - navigation.navigate('SocialMediaTaggs', { - socialMediaType: social, - userXId, - }); - } else { - getNonIntegratedURL(social, user.userId).then((socialURL) => { - if (socialURL) { - Linking.openURL(socialURL); - } else { - Alert.alert(ERROR_UNABLE_TO_FIND_PROFILE); - } - }); + if (youMayPass) { + if (canViewProfile(state, userXId, screenType)) { + if (INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1) { + navigation.navigate('SocialMediaTaggs', { + socialMediaType: social, + userXId, + }); + } else { + getNonIntegratedURL(social, user.userId).then((socialURL) => { + if (socialURL) { + Linking.openURL(socialURL); + } else { + Alert.alert(ERROR_UNABLE_TO_FIND_PROFILE); + } + }); + } } } else { if (isIntegrated) { -- cgit v1.2.3-70-g09d2