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.js 367B

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