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 f148aa0 commit 257ebc2Copy full SHA for 257ebc2
src/lib/rateApp.ts
@@ -1,4 +1,5 @@
1
-import * as StoreReview from 'expo-store-review';
+import { Linking } from "react-native";
2
+import * as StoreReview from "expo-store-review";
3
4
export const rateApp = async () => {
5
try {
@@ -8,11 +9,14 @@ export const rateApp = async () => {
8
9
} else {
10
// Fallback to opening the store review page
11
const storeUrl = await StoreReview.storeUrl();
12
+
13
if (storeUrl) {
- await StoreReview.requestReview();
14
+ await Linking.openURL(storeUrl);
15
+ } else {
16
+ console.warn("Store review URL is unavailable.");
17
}
18
19
} catch (error) {
- console.warn('Error requesting app review:', error);
20
+ console.warn("Error requesting app review:", error);
21
22
};
0 commit comments