PrivacyLink.tsx 666 B

1234567891011121314151617181920
  1. import React from "react"
  2. import { API_URL } from "../utils/RequestUtils"
  3. import * as WebBrowser from 'expo-web-browser'
  4. import { TouchableOpacity, Text } from "react-native"
  5. import { ProfileMainStyles } from "./Profile/Styles/Profile.styles"
  6. export const PrivacyLink: React.FC = () => {
  7. /**
  8. * Opens up the company privacy policy in the browser.
  9. */
  10. const openPrivacyPolicy = async () => {
  11. await WebBrowser.openBrowserAsync(API_URL + "/privacy")
  12. }
  13. return (
  14. <TouchableOpacity onPress={openPrivacyPolicy}>
  15. <Text style={ProfileMainStyles.privacyButtonText}>Privacy policy</Text>
  16. </TouchableOpacity>
  17. )
  18. }