Merge remote-tracking branch 'origin/main'
# Conflicts: # src/config/firebase.js
This commit is contained in:
@@ -28,7 +28,7 @@ const configureFunctionsEmulator = (instance, regionKey = "us-central1") => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(
|
console.warn(
|
||||||
`[firebase] Unable to set functions emulator for region ${regionKey}`,
|
`[firebase] Unable to set functions emulator for region ${regionKey}`,
|
||||||
error?.message,
|
error?.message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -52,10 +52,10 @@ if (!firebase?.apps?.filter(({ name_ }) => name_ === "[DEFAULT]").length) {
|
|||||||
|
|
||||||
// if (__DEV__) {
|
// if (__DEV__) {
|
||||||
// firebase.functions().useEmulator("localhost", 5001);
|
// firebase.functions().useEmulator("localhost", 5001);
|
||||||
// configureFunctionsEmulator(defaultFunctions, "us-central1");
|
|
||||||
// }
|
// }
|
||||||
const defaultFunctions = firebase.functions();
|
const defaultFunctions = firebase.functions();
|
||||||
functionsInstances["us-central1"] = defaultFunctions;
|
functionsInstances["us-central1"] = defaultFunctions;
|
||||||
|
configureFunctionsEmulator(defaultFunctions, "us-central1");
|
||||||
console.log("Firebase init");
|
console.log("Firebase init");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+42
-70
@@ -629,80 +629,52 @@ const Home = ({ navigation, route }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{adventureStarted ? (
|
{/* {adventureStarted ? ( */}
|
||||||
<View style={styles.root}>
|
<View style={styles.root}>
|
||||||
<Page
|
<Page
|
||||||
shareBtn
|
shareBtn
|
||||||
headerType="NONE"
|
headerType="NONE"
|
||||||
scrollEnabled={false}
|
scrollEnabled={false}
|
||||||
containerStyle={styles.page}
|
containerStyle={styles.page}
|
||||||
contentContainerStyle={styles.pageContent}
|
contentContainerStyle={styles.pageContent}
|
||||||
maxWidth={1600}
|
maxWidth={1600}
|
||||||
width="100%"
|
width="100%"
|
||||||
backgroundColor="#303438"
|
backgroundColor="#303438"
|
||||||
showReturnHome={isWeb}
|
showReturnHome={isWeb}
|
||||||
onReturnHome={handleReturnToLanding}
|
onReturnHome={handleReturnToLanding}
|
||||||
>
|
>
|
||||||
<View style={styles.inner}>
|
<View style={styles.inner}>
|
||||||
<ExpoImage
|
<ExpoImage
|
||||||
source={homeBackgroundImage}
|
source={homeBackgroundImage}
|
||||||
contentFit="cover"
|
contentFit="cover"
|
||||||
style={styles.centerImage}
|
style={styles.centerImage}
|
||||||
/>
|
/>
|
||||||
{isWeb ? (
|
{isWeb ? (
|
||||||
<>
|
<>
|
||||||
{/* <View style={styles.webReturnButtonWrapper}>
|
{/* <View style={styles.webReturnButtonWrapper}>
|
||||||
{returnHomeButton}
|
{returnHomeButton}
|
||||||
</View> */}
|
</View> */}
|
||||||
<View style={styles.contentOverlay}>
|
<View style={styles.contentOverlay}>
|
||||||
{topBar}
|
|
||||||
{journeyContent}
|
|
||||||
</View>
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<View style={[styles.contentOverlay, styles.mobileContent]}>
|
|
||||||
{topBar}
|
{topBar}
|
||||||
<ScrollView
|
{journeyContent}
|
||||||
style={styles.mobileScrollView}
|
|
||||||
contentContainerStyle={styles.mobileScrollContent}
|
|
||||||
showsVerticalScrollIndicator={false}
|
|
||||||
>
|
|
||||||
{journeyContent}
|
|
||||||
</ScrollView>
|
|
||||||
</View>
|
</View>
|
||||||
)}
|
</>
|
||||||
</View>
|
) : (
|
||||||
</Page>
|
<View style={[styles.contentOverlay, styles.mobileContent]}>
|
||||||
</View>
|
{topBar}
|
||||||
) : (
|
<ScrollView
|
||||||
<>
|
style={styles.mobileScrollView}
|
||||||
<Page
|
contentContainerStyle={styles.mobileScrollContent}
|
||||||
shareBtn
|
showsVerticalScrollIndicator={false}
|
||||||
title="Landing Page"
|
>
|
||||||
backgroundImg={landingBackgroundImage}
|
{journeyContent}
|
||||||
contentContainerStyle={styles.pageContent}
|
</ScrollView>
|
||||||
backgroundColor="#303438"
|
</View>
|
||||||
>
|
)}
|
||||||
<View
|
</View>
|
||||||
style={{
|
</Page>
|
||||||
flex: 1,
|
</View>
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<GradientButton
|
|
||||||
title="Commencer l'aventure MusicLand"
|
|
||||||
onPress={handleStartVisit}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</Page>
|
|
||||||
<FullscreenIntroVideo
|
|
||||||
url={videoUrl}
|
|
||||||
visible={!!videoUrl}
|
|
||||||
onClose={handleIntroVideoClose}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{!isWeb ? (
|
{!isWeb ? (
|
||||||
<CoinPackModal
|
<CoinPackModal
|
||||||
visible={isCoinModalVisible}
|
visible={isCoinModalVisible}
|
||||||
|
|||||||
+25
-25
@@ -119,31 +119,6 @@ export default function LandingPage() {
|
|||||||
)}
|
)}
|
||||||
{selectedLanguage && (
|
{selectedLanguage && (
|
||||||
<View style={styles.actions}>
|
<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
|
<GradientButton
|
||||||
title="Découvrir Musicland"
|
title="Découvrir Musicland"
|
||||||
onPress={() => setVideoUrl(video?.introWeb)}
|
onPress={() => setVideoUrl(video?.introWeb)}
|
||||||
@@ -178,6 +153,31 @@ export default function LandingPage() {
|
|||||||
containerStyle={styles.actionButton}
|
containerStyle={styles.actionButton}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : 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>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user