template_0205
This commit is contained in:
8
RN_TEMPLATE/app/utils/openLinkInBrowser.ts
Normal file
8
RN_TEMPLATE/app/utils/openLinkInBrowser.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Linking } from "react-native"
|
||||
|
||||
/**
|
||||
* Helper for opening a give URL in an external browser.
|
||||
*/
|
||||
export function openLinkInBrowser(url: string) {
|
||||
Linking.canOpenURL(url).then((canOpen) => canOpen && Linking.openURL(url))
|
||||
}
|
||||
Reference in New Issue
Block a user