您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

openURLInBrowser.native.ts 357B

123456789101112131415
  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. * @returns {void}
  8. */
  9. export function openURLInBrowser(url: string) {
  10. Linking.openURL(url).catch(error => {
  11. logger.error(`An error occurred while trying to open ${url}`, error);
  12. });
  13. }