diff --git a/src/components/PrivacyButton.tsx b/src/components/PrivacyButton.tsx index a3d190a..960957b 100644 --- a/src/components/PrivacyButton.tsx +++ b/src/components/PrivacyButton.tsx @@ -2,11 +2,12 @@ import React from 'react'; import { Linking, StyleSheet, Text, TouchableOpacity } from 'react-native'; import theme from '@/theme'; +import { withAppSource } from '@/utils'; const PrivacyButton = () => ( Linking.openURL(process.env.EXPO_PUBLIC_DUSKEN_PRIVACY_POLICY_URL || '')} + onPress={() => Linking.openURL(withAppSource(process.env.EXPO_PUBLIC_DUSKEN_PRIVACY_POLICY_URL || ''))} > Personvern diff --git a/src/modules/about/About.tsx b/src/modules/about/About.tsx index 13f65e9..ca8b0ac 100644 --- a/src/modules/about/About.tsx +++ b/src/modules/about/About.tsx @@ -13,6 +13,7 @@ import { import Button from '@/components/Button'; import theme from '@/theme'; +import { withAppSource } from '@/utils'; import logo from '@assets/DNS-logo-svart.png'; import IconClock from '@assets/icons/clock.svg'; import IconFacebook from '@assets/icons/facebook.svg'; @@ -95,7 +96,7 @@ const About = () => ( Det Norske Studentersamfund - Linking.openURL('https://www.studentersamfundet.no/')}> + Linking.openURL(withAppSource('https://neuf.no/'))}> Følg oss på @@ -126,7 +127,10 @@ const About = () => ( Åpningstider - diff --git a/src/modules/events/EventList.tsx b/src/modules/events/EventList.tsx index 5e8d4a5..488824e 100644 --- a/src/modules/events/EventList.tsx +++ b/src/modules/events/EventList.tsx @@ -8,6 +8,7 @@ import { StyleSheet, View, Platform, FlatList, TouchableOpacity, Text, Linking } import Button from '@/components/Button'; import theme from '@/theme'; import { EventType } from '@/types/data'; +import { withAppSource } from '@/utils'; import useEventList from './useEventList'; @@ -25,7 +26,7 @@ const EventList = () => { const renderItem = ({ item, index }: { item: EventType; index: number }) => ( { - return Linking.openURL(item.url); + return Linking.openURL(withAppSource(item.url)); }} style={[styles.listItem, ...(index === events.length - 1 ? [styles.lastListItem] : [])]} > diff --git a/src/modules/login/Login.tsx b/src/modules/login/Login.tsx index 4770c7c..1c77722 100644 --- a/src/modules/login/Login.tsx +++ b/src/modules/login/Login.tsx @@ -5,6 +5,7 @@ import Button from '@/components/Button'; import FormErrors from '@/components/FormErrors'; import FormInput from '@/components/FormInput'; import theme from '@/theme'; +import { withAppSource } from '@/utils'; import useLogin from './useLogin'; @@ -47,7 +48,7 @@ const Login = () => {