aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/Tagg.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-31 18:29:33 -0400
committerIvan Chen <ivan@tagg.id>2021-03-31 18:29:33 -0400
commit097b515066f1a0c38cb7fb69cf78b16b945594e5 (patch)
treec1495c05e8ca424b2ef74c8bc073d5029aa51dc8 /src/components/taggs/Tagg.tsx
parent49a1412401e99912569748b6f3898f56ee38bf9d (diff)
fixed bug
Diffstat (limited to 'src/components/taggs/Tagg.tsx')
-rw-r--r--src/components/taggs/Tagg.tsx30
1 files changed, 16 insertions, 14 deletions
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<TaggProps> = ({
*/
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) {