|
@@ -57,6 +57,15 @@ const FixerItem = ({
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+ const openURLWithPrefix = async (url: string) => {
|
|
|
+ const prefixedURL = url.startsWith('http://') || url.startsWith('https://') ? url : `http://${url}`;
|
|
|
+ const supported = await Linking.canOpenURL(prefixedURL);
|
|
|
+
|
|
|
+ if (supported) {
|
|
|
+ Linking.openURL(prefixedURL);
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
return (
|
|
|
<View style={styles.fixerItemContainer}>
|
|
|
<View style={styles.fixerHeaderContainer}>
|
|
@@ -114,8 +123,8 @@ const FixerItem = ({
|
|
|
{item.web && (
|
|
|
<View style={styles.rowContent}>
|
|
|
<Text style={styles.labelText}>Website:</Text>
|
|
|
- <TouchableOpacity style={{ flex: 4 }} onPress={() => Linking.openURL(item.web)}>
|
|
|
- <Text style={[styles.linkText]}>{item.web}</Text>
|
|
|
+ <TouchableOpacity style={{ flex: 4 }} onPress={() => openURLWithPrefix(item.web)}>
|
|
|
+ <Text style={[styles.linkText]} selectable>{item.web}</Text>
|
|
|
</TouchableOpacity>
|
|
|
</View>
|
|
|
)}
|