We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0c3aaf commit 1ae3cebCopy full SHA for 1ae3ceb
sample/src/screens/CartScreen.tsx
@@ -32,7 +32,6 @@ import {
32
ActivityIndicator,
33
Pressable,
34
RefreshControl,
35
- Alert,
36
} from 'react-native';
37
import Icon from 'react-native-vector-icons/Entypo';
38
@@ -87,14 +86,10 @@ function CartScreen(): React.JSX.Element {
87
86
88
const presentCheckout = async () => {
89
if (checkoutURL) {
90
- const auth = await fetchToken();
91
- if (!auth) {
92
- Alert.alert('Error', 'Failed to authenticate');
93
- return;
94
- }
+ const token = await fetchToken();
95
96
ShopifyCheckout.present(checkoutURL, {
97
- authentication: { token: auth },
+ authentication: token ? { token } : undefined,
98
});
99
}
100
};
0 commit comments