aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/Tagg.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2020-10-27 19:31:39 -0400
committerGitHub <noreply@github.com>2020-10-27 19:31:39 -0400
commit795ba089207571ec13226f2d07c149c8697763ce (patch)
tree81d08094396cda3195287fa0c72c5cb4c91a1287 /src/components/taggs/Tagg.tsx
parente004fd362583a020b07f87536aac077269eaad27 (diff)
done (#81)
Diffstat (limited to 'src/components/taggs/Tagg.tsx')
-rw-r--r--src/components/taggs/Tagg.tsx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/components/taggs/Tagg.tsx b/src/components/taggs/Tagg.tsx
index 39cbee06..a9bc05a9 100644
--- a/src/components/taggs/Tagg.tsx
+++ b/src/components/taggs/Tagg.tsx
@@ -7,6 +7,7 @@ import RingPlus from '../../assets/icons/ring+.svg';
import Ring from '../../assets/icons/ring.svg';
import {INTEGRATED_SOCIAL_LIST, TAGG_ICON_DIM} from '../../constants';
import {
+ getNonIntegratedURL,
handlePressForAuthBrowser,
registerNonIntegratedSocialLink,
} from '../../services';
@@ -19,6 +20,7 @@ interface TaggProps {
isIntegrated: boolean;
setTaggsNeedUpdate: (_: boolean) => void;
setSocialDataNeedUpdate: (_: string[]) => void;
+ userId: string;
}
const Tagg: React.FC<TaggProps> = ({
@@ -28,6 +30,7 @@ const Tagg: React.FC<TaggProps> = ({
isIntegrated,
setTaggsNeedUpdate,
setSocialDataNeedUpdate,
+ userId,
}) => {
const navigation = useNavigation();
const [modalVisible, setModalVisible] = useState(false);
@@ -59,10 +62,13 @@ const Tagg: React.FC<TaggProps> = ({
isProfileView: isProfileView,
});
} else {
- // TODO: we don't know what the link is...?
- Linking.openURL(
- `http://google.com/search?q=take+me+to+${social}+profile+page`,
- );
+ getNonIntegratedURL(social, userId).then((socialURL) => {
+ if (socialURL) {
+ Linking.openURL(socialURL);
+ } else {
+ Alert.alert('We were unable to find this profile 😔');
+ }
+ });
}
} else {
if (isIntegrated) {