選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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. }