You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openURLInBrowser.native.ts 415B

12345678910111213141516
  1. import { Linking } from 'react-native';
  2. import logger from './logger';
  3. /**
  4. * Opens URL in the browser.
  5. *
  6. * @param {string} url - The URL to be opened.
  7. * @param {boolean} _ignore - Ignored.
  8. * @returns {void}
  9. */
  10. export function openURLInBrowser(url: string, _ignore?: boolean) {
  11. Linking.openURL(url).catch(error => {
  12. logger.error(`An error occurred while trying to open ${url}`, error);
  13. });
  14. }