online videos
This commit is contained in:
@@ -7,7 +7,7 @@ import React, {
|
||||
} from "react";
|
||||
import { Platform, StyleSheet, View } from "react-native";
|
||||
import useMinuit from "react-native-minuit/src/hooks/useMinuit.js";
|
||||
import { background } from "../../assets";
|
||||
import { background, videos } from "../../assets";
|
||||
import Alert from "../../components/Alert";
|
||||
import BorderGradientButton from "../../components/BorderGradientButton";
|
||||
import FeatureCarousel from "../../components/FeatureCarousel/FeatureCarousel";
|
||||
@@ -16,7 +16,8 @@ import GradientButton from "../../components/GradientButton";
|
||||
import MoreMenu from "../../components/MoreMenu";
|
||||
import ProjectDropDown from "../../components/ProjectDropDown/ProjectDropDown";
|
||||
import ShareBtn from "../../components/ShareBtn/ShareBtn";
|
||||
import { projectsRef, usersRef } from "../../config/firebase";
|
||||
import { projectsRef, usersRef, videosRef } from "../../config/firebase";
|
||||
import useDataFromRef from "../../hooks/useDataFromRef";
|
||||
import { isWeb } from "../../hooks/useLayoutType.js";
|
||||
import Page from "../../layouts/Page";
|
||||
import { navigate } from "../../navigation/NavigationService";
|
||||
@@ -325,6 +326,11 @@ const Home = () => {
|
||||
const adventureStarted =
|
||||
hasLocalAdventureFlag || !!currentUserData?.adventureStarted;
|
||||
|
||||
const { data: video } = useDataFromRef({
|
||||
ref: videosRef.doc("fr"),
|
||||
simpleRef: true,
|
||||
});
|
||||
const videoUrl = isWeb ? video?.landingWeb : video?.landing;
|
||||
return adventureStarted ? (
|
||||
<Page
|
||||
shareBtn
|
||||
@@ -427,12 +433,14 @@ const Home = () => {
|
||||
}}
|
||||
>
|
||||
<GradientButton
|
||||
url={videos.landing}
|
||||
title="Commencer l'aventure MusicLand"
|
||||
onPress={handleStartVisit}
|
||||
/>
|
||||
</View>
|
||||
</Page>
|
||||
<FullscreenIntroVideo
|
||||
url={videoUrl}
|
||||
visible={isIntroVideoVisible}
|
||||
onClose={handleIntroVideoClose}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user