feat: center generation text

This commit is contained in:
2026-03-04 15:30:18 +01:00
parent c340b87c68
commit 4b64e2d961
4 changed files with 65 additions and 16 deletions
+14 -6
View File
@@ -8,12 +8,12 @@ import MusicLandHeader from '../../components/MusicLandHeader'
import Page from '../../layouts/Page'
import { isWeb } from '../../hooks/useLayoutType'
import { Routes } from '../../navigation'
import { navigate } from '../../navigation/NavigationService'
import { goBack, navigate } from '../../navigation/NavigationService'
import { useUser } from '../../providers/UserDataProvider'
import { gutters } from '../../styles'
const Playback = ({ route, navigation }) => {
const { project } = route.params || {}
const { project, returnToAdventureModal = false } = route.params || {}
const { videos } = useUser()
// const benhaiUrl = isWeb ? videos?.benhaiWeb || null : videos?.benhai;
const theoUrl = isWeb ? videos?.theoWeb : videos?.theo
@@ -23,9 +23,17 @@ const Playback = ({ route, navigation }) => {
setShowIntro(null)
}
const handleBackPress = useCallback(() => {
if (returnToAdventureModal) {
goBack()
return
}
navigation.navigate(Routes.Home)
}, [navigation, returnToAdventureModal])
const onPressRecord = useCallback(() => {
navigate(Routes.RecordPlayback, { project })
}, [project])
navigate(Routes.RecordPlayback, { project, returnToAdventureModal })
}, [project, returnToAdventureModal])
return (
<Page
@@ -33,7 +41,7 @@ const Playback = ({ route, navigation }) => {
backgroundImg={isWeb ? background.playbackWeb : background.playbackMobile}
>
{/* <Image source={ai.theo} style={styles.img} resizeMode="contain" /> */}
<MusicLandHeader onPressBack={() => navigation.navigate(Routes.Home)} progress={25} />
<MusicLandHeader onPressBack={handleBackPress} progress={25} />
<View
style={{
flex: 1,
@@ -45,7 +53,7 @@ const Playback = ({ route, navigation }) => {
<GradientButton title="Enregistrer mon Playback" onPress={onPressRecord} />
<BorderGradientButton
title="Guide du Playbacker"
onPress={() => navigate(Routes.PlaybackGuide)}
onPress={() => navigate(Routes.PlaybackGuide, { returnToAdventureModal })}
/>
{/* <BorderGradientButton title="Importer une vidéo" /> */}
</View>