2022-11-01 21:12:33 +00:00
|
|
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
|
|
|
2019-10-11 18:09:50 +00:00
|
|
|
import { Linking } from 'react-native';
|
|
|
|
|
|
|
|
import logger from './logger';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Opens URL in the browser.
|
|
|
|
*
|
|
|
|
* @param {string} url - The URL to be opened.
|
2022-10-28 10:07:58 +00:00
|
|
|
* @param {boolean} _ignore - Ignored.
|
2019-10-11 18:09:50 +00:00
|
|
|
* @returns {void}
|
|
|
|
*/
|
2022-10-28 10:07:58 +00:00
|
|
|
export function openURLInBrowser(url: string, _ignore?: boolean) {
|
2019-10-11 18:09:50 +00:00
|
|
|
Linking.openURL(url).catch(error => {
|
|
|
|
logger.error(`An error occurred while trying to open ${url}`, error);
|
|
|
|
});
|
|
|
|
}
|