Skip to content

Commit

Permalink
fix(react-native): change openURLInBrowser to Linking.openURL for rea…
Browse files Browse the repository at this point in the history
…ct native web (#9482)
  • Loading branch information
xiongemi committed Apr 3, 2022
1 parent dbe942c commit bc31273
Showing 1 changed file with 9 additions and 11 deletions.
Expand Up @@ -8,11 +8,9 @@ import {
Text,
StatusBar,
TouchableOpacity,
Linking,
} from 'react-native';

// @ts-ignore
import openURLInBrowser from 'react-native/Libraries/Core/Devtools/openURLInBrowser';

import Checkmark from './icons/checkmark.svg';
import Book from './icons/book.svg';
import ChevronRight from './icons/chevron-right.svg';
Expand Down Expand Up @@ -82,7 +80,7 @@ export const App = () => {
<TouchableOpacity
style={[styles.listItem, styles.learning]}
onPress={() =>
openURLInBrowser(
Linking.openURL(
'https://nx.dev/getting-started/intro?utm_source=nx-project'
)
}
Expand All @@ -99,7 +97,7 @@ export const App = () => {
<TouchableOpacity
style={[styles.listItem, styles.learning]}
onPress={() =>
openURLInBrowser(
Linking.openURL(
'https://blog.nrwl.io/?utm_source=nx-project'
)
}
Expand All @@ -116,7 +114,7 @@ export const App = () => {
<TouchableOpacity
style={[styles.listItem, styles.learning]}
onPress={() =>
openURLInBrowser(
Linking.openURL(
'https://www.youtube.com/c/Nrwl_io/videos?utm_source=nx-project'
)
}
Expand All @@ -133,7 +131,7 @@ export const App = () => {
<TouchableOpacity
style={[styles.listItem, styles.learning]}
onPress={() =>
openURLInBrowser(
Linking.openURL(
'https://nx.dev/tutorial/01-create-application?utm_source=nx-project'
)
}
Expand All @@ -150,7 +148,7 @@ export const App = () => {
<TouchableOpacity
style={[styles.listItem, styles.learning]}
onPress={() =>
openURLInBrowser(
Linking.openURL(
'https://nxplaybook.com/?utm_source=nx-project'
)
}
Expand All @@ -169,7 +167,7 @@ export const App = () => {
<View style={styles.section}>
<TouchableOpacity
onPress={() =>
openURLInBrowser(
Linking.openURL(
'https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console&utm_source=nx-project'
)
}
Expand All @@ -196,7 +194,7 @@ export const App = () => {
<View style={styles.section}>
<TouchableOpacity
onPress={() =>
openURLInBrowser('https://nx.app/?utm_source=nx-project')
Linking.openURL('https://nx.app/?utm_source=nx-project')
}
>
<View style={styles.shadowBox}>
Expand Down Expand Up @@ -226,7 +224,7 @@ export const App = () => {
<View style={styles.section}>
<TouchableOpacity
onPress={() =>
openURLInBrowser('https://nx.app/?utm_source=nx-project')
Linking.openURL('https://nx.app/?utm_source=nx-project')
}
>
<View style={[styles.listItem, styles.shadowBox]}>
Expand Down

0 comments on commit bc31273

Please sign in to comment.