feat: free credits
This commit is contained in:
@@ -28,7 +28,7 @@ const configureFunctionsEmulator = (instance, regionKey = "us-central1") => {
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
`[firebase] Unable to set functions emulator for region ${regionKey}`,
|
||||
error?.message,
|
||||
error?.message
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -50,9 +50,9 @@ if (!firebase?.apps?.filter(({ name_ }) => name_ === "[DEFAULT]").length) {
|
||||
persistence: getReactNativePersistence(AsyncStorage),
|
||||
});
|
||||
|
||||
if (__DEV__) {
|
||||
firebase.functions().useEmulator("localhost", 5001);
|
||||
}
|
||||
// if (__DEV__) {
|
||||
// firebase.functions().useEmulator("localhost", 5001);
|
||||
// }
|
||||
const defaultFunctions = firebase.functions();
|
||||
functionsInstances["us-central1"] = defaultFunctions;
|
||||
configureFunctionsEmulator(defaultFunctions, "us-central1");
|
||||
|
||||
+25
-25
@@ -120,31 +120,6 @@ export default function LandingPage() {
|
||||
)}
|
||||
{selectedLanguage && (
|
||||
<View style={styles.actions}>
|
||||
{showFreeCreditsPopup && (
|
||||
<BlurView style={styles.freeCreditsCard}>
|
||||
<View style={styles.freeCreditsContent}>
|
||||
<View style={styles.freeCreditsTextContainer}>
|
||||
<Text style={styles.freeCreditsTitle}>
|
||||
Tu as 5 crédits gratuits
|
||||
</Text>
|
||||
<Text style={styles.freeCreditsSubtitle}>
|
||||
pour 1 parcours offert !
|
||||
</Text>
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
onPress={() => setShowFreeCreditsPopup(false)}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Fermer le message des crédits offerts"
|
||||
style={styles.freeCreditsClose}
|
||||
>
|
||||
<Image
|
||||
source={icons.close}
|
||||
style={styles.freeCreditsCloseIcon}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</BlurView>
|
||||
)}
|
||||
<GradientButton
|
||||
title="Découvrir Musicland"
|
||||
onPress={() => setVideoUrl(video?.introWeb)}
|
||||
@@ -177,6 +152,31 @@ export default function LandingPage() {
|
||||
containerStyle={styles.actionButton}
|
||||
/>
|
||||
) : null}
|
||||
{showFreeCreditsPopup && (
|
||||
<BlurView style={styles.freeCreditsCard}>
|
||||
<View style={styles.freeCreditsContent}>
|
||||
<View style={styles.freeCreditsTextContainer}>
|
||||
<Text style={styles.freeCreditsTitle}>
|
||||
5 crédits offert
|
||||
</Text>
|
||||
<Text style={styles.freeCreditsSubtitle}>
|
||||
pour 1 parcours gratuit !
|
||||
</Text>
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
onPress={() => setShowFreeCreditsPopup(false)}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Fermer le message des crédits offerts"
|
||||
style={styles.freeCreditsClose}
|
||||
>
|
||||
<Image
|
||||
source={icons.close}
|
||||
style={styles.freeCreditsCloseIcon}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</BlurView>
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user