Files
jitsi-meet/react/features/base/util/openURLInBrowser.native.ts

17 lines
415 B
TypeScript
Raw Normal View History

2019-10-11 19:09:50 +01:00
import { Linking } from 'react-native';
import logger from './logger';
/**
* Opens URL in the browser.
*
* @param {string} url - The URL to be opened.
* @param {boolean} _ignore - Ignored.
2019-10-11 19:09:50 +01:00
* @returns {void}
*/
export function openURLInBrowser(url: string, _ignore?: boolean) {
2019-10-11 19:09:50 +01:00
Linking.openURL(url).catch(error => {
logger.error(`An error occurred while trying to open ${url}`, error);
});
}