File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -143,5 +143,10 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
143143 graphqlUrl : getGraphqlUrl ( ) ,
144144 appVariant : APP_VARIANT || "internal" ,
145145 associatedDomains : getAssociatedDomains ( ) ,
146+ storeReviewUrl : {
147+ ios : "https://apps.apple.com/de/app/democracy/id1341311162" ,
148+ android :
149+ "https://play.google.com/store/apps/details?id=de.democracydeutschland.app&hl=de&pli=1" ,
150+ } ,
146151 } ,
147152} ) ;
Original file line number Diff line number Diff line change 11import Constants from "expo-constants" ;
2+ import { Platform } from "react-native" ;
23
34const extra = Constants . expoConfig ?. extra || { } ;
45const APP_VARIANT = extra . appVariant || "internal" ;
@@ -13,10 +14,20 @@ const ANDROID_SERVER = "192.168.0.166";
1314const ASSOCIATED_DOMAINS = extra . associatedDomains || [
1415 "internal.democracy-app.de" ,
1516] ;
17+ const STORE_REVIEW_URL_IOS = extra . storeReviewUrl ?. ios || "" ;
18+ const STORE_REVIEW_URL_ANDROID = extra . storeReviewUrl ?. android || "" ;
19+ const STORE_REVIEW_URL =
20+ Platform . select ( {
21+ ios : STORE_REVIEW_URL_IOS ,
22+ android : STORE_REVIEW_URL_ANDROID ,
23+ } ) || "" ;
1624
1725export {
1826 GRAPHQL_URL ,
1927 GRAPHQL_SERVER_LOCAL ,
2028 ANDROID_SERVER ,
2129 ASSOCIATED_DOMAINS ,
30+ STORE_REVIEW_URL_IOS ,
31+ STORE_REVIEW_URL_ANDROID ,
32+ STORE_REVIEW_URL ,
2233} ;
Original file line number Diff line number Diff line change 11import { Linking } from "react-native" ;
22import * as StoreReview from "expo-store-review" ;
3+ import { STORE_REVIEW_URL } from "../api/config" ;
34
45export const rateApp = async ( ) => {
56 try {
@@ -12,6 +13,8 @@ export const rateApp = async () => {
1213
1314 if ( storeUrl ) {
1415 await Linking . openURL ( storeUrl ) ;
16+ } else if ( STORE_REVIEW_URL ) {
17+ await Linking . openURL ( STORE_REVIEW_URL ) ;
1518 } else {
1619 console . warn ( "Store review URL is unavailable." ) ;
1720 }
You can’t perform that action at this time.
0 commit comments