clear last tickets

This commit is contained in:
Thomas Demirdjian
2025-11-26 15:33:22 +01:00
parent ee9cc5dccd
commit d7b14bd873
25 changed files with 1692 additions and 1967 deletions
+13 -30
View File
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useState } from "react";
import React, { useCallback, useState } from "react";
import { Image, StyleSheet, View } from "react-native";
import { ai, background } from "../../assets";
import BorderGradientButton from "../../components/BorderGradientButton";
@@ -8,40 +8,23 @@ import MusicLandHeader from "../../components/MusicLandHeader";
import Page from "../../layouts/Page";
import { isWeb } from "../../hooks/useLayoutType";
import { Routes } from "../../navigation";
import { goBack, navigate } from "../../navigation/NavigationService";
import { navigate } from "../../navigation/NavigationService";
import { useUser } from "../../providers/UserDataProvider";
import { gutters } from "../../styles";
const Playback = ({ route, navigation }) => {
const { project } = route.params || {};
const { videos } = useUser();
const [showIntro, setShowIntro] = useState(false);
const benhaiUrl = isWeb ? videos?.benhaiWeb || null : videos?.benhai;
const [showIntro, setShowIntro] = useState(benhaiUrl);
const introVideoUrl = useMemo(() => {
if (!videos) {
return null;
const handleCloseIntro = () => {
if (showIntro === benhaiUrl) {
setShowIntro(videos.theo);
} else {
setShowIntro(null);
}
return isWeb ? videos?.benhaiWeb || null : videos?.benhai || null;
}, [videos]);
useEffect(() => {
if (!introVideoUrl) {
setShowIntro(false);
return;
}
setShowIntro(true);
}, [introVideoUrl]);
const handleCloseIntro = useCallback(() => {
setShowIntro(false);
}, []);
const handleShowGuide = useCallback(() => {
if (!introVideoUrl) {
return;
}
setShowIntro(true);
}, [introVideoUrl]);
};
const onPressRecord = useCallback(() => {
navigate(Routes.RecordPlayback, { project });
@@ -68,14 +51,14 @@ const Playback = ({ route, navigation }) => {
/>
<BorderGradientButton
title="Guide du Playbacker"
onPress={handleShowGuide}
onPress={() => setShowIntro(videos.theo)}
/>
{/* <BorderGradientButton title="Importer une vidéo" /> */}
</View>
</View>
<FullscreenIntroVideo
url={introVideoUrl}
visible={showIntro && !!introVideoUrl}
url={showIntro}
visible={showIntro}
onClose={handleCloseIntro}
/>
</Page>