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

openURLInBrowser.native.ts 471B

123456789101112131415161718
  1. /* eslint-disable @typescript-eslint/no-unused-vars */
  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. * @param {boolean} _ignore - Ignored.
  9. * @returns {void}
  10. */
  11. export function openURLInBrowser(url: string, _ignore?: boolean) {
  12. Linking.openURL(url).catch(error => {
  13. logger.error(`An error occurred while trying to open ${url}`, error);
  14. });
  15. }