Skip to content

Commit b0a54ba

Browse files
committed
fix(minor): properly handle link press
1 parent a94dd22 commit b0a54ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/utils/handlers.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { Linking } from 'react-native';
22

33
export const onLinkPress = (url: string) => () => {
4-
try {
5-
Linking.openURL(url);
6-
} catch (e) {
7-
console.warn("URL can't be opened", e);
8-
}
4+
Linking.canOpenURL(url).then(() => Linking.openURL(url));
95
};

0 commit comments

Comments
 (0)