last fixes, home and videos
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { useState } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Image, StyleSheet, View } from "react-native";
|
||||
import { ai, background } from "../../assets";
|
||||
import FullscreenIntroVideo from "../../components/FullscreenIntroVideo";
|
||||
@@ -8,9 +8,17 @@ import Page from "../../layouts/Page";
|
||||
import { Routes } from "../../navigation";
|
||||
import { goBack, navigate } from "../../navigation/NavigationService";
|
||||
import { gutters } from "../../styles";
|
||||
import { useUserData } from "../../providers/UserDataProvider";
|
||||
import { isWeb } from "../../hooks/useLayoutType";
|
||||
|
||||
const Compose = () => {
|
||||
const [showIntro, setShowIntro] = useState(true);
|
||||
const { videos } = useUserData();
|
||||
|
||||
const [videoUrl, setVideoUrl] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
setVideoUrl(isWeb ? videos.malikWeb : videos?.malik);
|
||||
}, []);
|
||||
return (
|
||||
<Page backgroundImg={background.studioBG2} headerType="NONE">
|
||||
<Image source={ai.malik} style={styles.img} resizeMode="contain" />
|
||||
@@ -36,8 +44,9 @@ const Compose = () => {
|
||||
</View>
|
||||
</View>
|
||||
<FullscreenIntroVideo
|
||||
visible={showIntro}
|
||||
onClose={() => setShowIntro(false)}
|
||||
visible={!!videoUrl}
|
||||
url={videoUrl}
|
||||
onClose={() => setVideoUrl(null)}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user