aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/Tagg.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-29 14:02:44 -0400
committerIvan Chen <ivan@tagg.id>2021-03-29 14:02:44 -0400
commit8e4fc71e625e8818773ebfa3d93bbee32b3ffe99 (patch)
tree456da2ab38384ec569596845f10ee54b6191fffd /src/components/taggs/Tagg.tsx
parent04bf806285e7626644234b7febee2dad5c912f8d (diff)
disabled press animation
Diffstat (limited to 'src/components/taggs/Tagg.tsx')
-rw-r--r--src/components/taggs/Tagg.tsx31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx
index ae9ab091..4e4987fb 100644
--- a/src/components/taggs/Tagg.tsx
+++ b/src/components/taggs/Tagg.tsx
@@ -72,21 +72,19 @@ const Tagg: React.FC<TaggProps> = ({
const modalOrAuthBrowserOrPass = async () => {
if (youMayPass) {
- if (allowNavigation) {
- if (INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1) {
- navigation.push('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 (INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1) {
+ navigation.push('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) {
@@ -149,7 +147,8 @@ const Tagg: React.FC<TaggProps> = ({
<View style={whiteRing ? styles.spcontainer : styles.container}>
<TouchableOpacity
style={styles.iconTap}
- onPress={modalOrAuthBrowserOrPass}>
+ onPress={modalOrAuthBrowserOrPass}
+ disabled={!allowNavigation}>
<SocialIcon style={styles.icon} social={social} whiteRing />
{pickTheRightRingHere()}
</TouchableOpacity>