From 1cb171c8039971e4076b7ba219a9a0d93bfdf14d Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Fri, 6 Sep 2024 18:42:36 +0200 Subject: [PATCH] add tiktok link to about page --- assets/icons/tiktok.svg | 6 ++++++ src/modules/about/About.tsx | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 assets/icons/tiktok.svg diff --git a/assets/icons/tiktok.svg b/assets/icons/tiktok.svg new file mode 100644 index 0000000..67b21c6 --- /dev/null +++ b/assets/icons/tiktok.svg @@ -0,0 +1,6 @@ + + + +tiktok + + \ No newline at end of file diff --git a/src/modules/about/About.tsx b/src/modules/about/About.tsx index 065ae48..aa21809 100644 --- a/src/modules/about/About.tsx +++ b/src/modules/about/About.tsx @@ -19,6 +19,7 @@ import IconInstagram from 'assets/icons/instagram.svg'; import IconMail from 'assets/icons/mail.svg'; import IconMap from 'assets/icons/map.svg'; import IconPhone from 'assets/icons/phone.svg'; +import IconTiktok from 'assets/icons/tiktok.svg'; import theme from 'src/theme'; const CHATEAU_NEUF_ADDRESS = 'Det Norske Studentersamfund, Slemdalsveien 15, 0369 Oslo'; @@ -57,6 +58,22 @@ const openInstagram = () => { .catch((err) => console.error('An error occurred', err)); }; +const openTiktok = () => { + const url = + Platform.select({ + ios: 'tiktok://user?username=studentersamfund', + android: 'https://www.tiktok.com/@studentersamfund', + }) || ''; + Linking.canOpenURL(url) + .then((supported) => { + if (!supported) { + return Linking.openURL('https://www.tiktok.com/@studentersamfund'); + } + return Linking.openURL(url); + }) + .catch((err) => console.error('An error occurred', err)); +}; + const openMap = () => { const url = Platform.select({ @@ -91,6 +108,10 @@ const About = () => ( Instagram + + + TikTok + Adresse