diff --git a/App.js b/App.js index 4807119..2626af6 100644 --- a/App.js +++ b/App.js @@ -36,8 +36,8 @@ import Providers from "./src/providers"; import { LogBox } from "react-native"; import CommentsBottomSheet from "./src/components/bottomsheets/CommentsBottomSheet"; -import "./src/utils/Sheet"; import ShareQrModalContainer from "./src/components/modal/ShareQrModalContainer"; +import "./src/utils/Sheet"; console.disableYellowBox = true; console.reportErrorsAsExceptions = false; diff --git a/src/components/modal/ShareModal.js b/src/components/modal/ShareModal.js index 37c49dd..4599baf 100644 --- a/src/components/modal/ShareModal.js +++ b/src/components/modal/ShareModal.js @@ -267,7 +267,7 @@ const ShareModal = ({ payload }) => { {copied ? Lien copié : null} - + {sectionTitle} {shareOptions.map((option, index) => { diff --git a/src/screens/Playbacks/Playbacks.js b/src/screens/Playbacks/Playbacks.js index 3a148a5..80412e2 100644 --- a/src/screens/Playbacks/Playbacks.js +++ b/src/screens/Playbacks/Playbacks.js @@ -152,7 +152,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => { // Micro-correction initiale uniquement pour absorber un léger décalage réseau useEffect(() => { if (!isActive || !hasExternalAudio) return; - const t = setTimeout(() => { + const t = global.setTimeout(() => { try { const a = audioPlayer?.currentTime || 0; const v = videoPlayer?.currentTime || 0; @@ -161,7 +161,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => { } } catch (e) {} }, 300); - return () => clearTimeout(t); + return () => global.clearTimeout(t); }, [isActive, hasExternalAudio, audioPlayer, videoPlayer]); useEffect(() => { @@ -190,7 +190,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => { const [currentTimeS, setCurrentTimeS] = useState(0); useEffect(() => { if (!isActive) return; - const id = setInterval(() => { + const id = global.setInterval(() => { try { const t = hasExternalAudio ? Number(audioPlayer?.currentTime || 0) @@ -198,7 +198,7 @@ const PlaybackItem = ({ item, isActive, userCache, getUserByUid }) => { setCurrentTimeS(t); } catch (e) {} }, 250); - return () => clearInterval(id); + return () => global.clearInterval(id); }, [isActive, hasExternalAudio, audioPlayer, videoPlayer]); // partage: géré via l'API native Share directement dans l'UI @@ -530,7 +530,7 @@ const Playbacks = () => { if (idx >= 0) { setActiveIndex(idx); // give time for first render before scrolling - setTimeout(() => { + global.setTimeout(() => { try { carouselRef.current?.scrollTo?.({ index: idx, animated: false }); } catch (e) {} diff --git a/src/screens/Writing/CreatingLyrics.js b/src/screens/Writing/CreatingLyrics.js index bf552da..9003446 100644 --- a/src/screens/Writing/CreatingLyrics.js +++ b/src/screens/Writing/CreatingLyrics.js @@ -1,16 +1,16 @@ -import { View, Text, Image, Platform, Alert } from "react-native"; -import React, { useEffect, useRef, useState } from "react"; -import { Palette, Style } from "../../styles"; import { BlurView } from "expo-blur"; -import { ai } from "../../assets"; -import ProgressBar from "../../components/ProgressBar"; -import { FONT_FAMILY } from "../../styles/Fonts"; -import GradientButton from "../../components/GradientButton"; -import { navigate } from "../../navigation/NavigationService"; -import { Routes } from "../../navigation"; -import firebase from "../../config/firebase"; +import React, { useEffect, useRef, useState } from "react"; +import { Alert, Image, Platform, Text, View } from "react-native"; import useMinuit from "react-native-minuit/src/hooks/useMinuit.js"; +import { ai } from "../../assets"; +import GradientButton from "../../components/GradientButton"; +import ProgressBar from "../../components/ProgressBar"; +import firebase from "../../config/firebase"; +import { Routes } from "../../navigation"; +import { navigate } from "../../navigation/NavigationService"; import { useUser } from "../../providers/UserDataProvider"; +import { Palette, Style } from "../../styles"; +import { FONT_FAMILY } from "../../styles/Fonts"; const CreatingLyrics = ({ active, config, selections }) => { const [progress, setProgress] = useState(0); @@ -78,7 +78,7 @@ const CreatingLyrics = ({ active, config, selections }) => { const rawMessage = typeof e?.message === "string" ? e.message : ""; const cleanedMessage = rawMessage.replace( /^functions error: \w+-\w+:\s*/i, - "", + "" ); setError({ message: @@ -154,7 +154,7 @@ const CreatingLyrics = ({ active, config, selections }) => { onPress: redirect, }, ], - { cancelable: false }, + { cancelable: false } ); if (Platform.OS === "web") { @@ -246,7 +246,7 @@ const CreatingLyrics = ({ active, config, selections }) => { setSaved(true); await setIsLoading(true); console.log( - "📄 [CreatingLyrics] Consultation manuelle du texte", + "📄 [CreatingLyrics] Consultation manuelle du texte" ); await updateProjectData({ title: result?.title || "", @@ -261,7 +261,7 @@ const CreatingLyrics = ({ active, config, selections }) => { } catch (e) { console.error( "⚠️ [CreatingLyrics] Erreur lors de l'ouverture manuelle", - e, + e ); } finally { await setIsLoading(false);