feat: assets

This commit is contained in:
2026-03-03 13:32:55 +01:00
parent e88ab1ed31
commit a09e21bd6b
8 changed files with 47 additions and 8 deletions
+18 -3
View File
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react'
import { View } from 'react-native'
import { useIsFocused } from '@react-navigation/native'
import { useIsFocused, useRoute } from '@react-navigation/native'
import { background } from '../../assets'
import FullscreenIntroVideo from '../../components/FullscreenIntroVideo'
import GradientButton from '../../components/GradientButton'
@@ -15,16 +15,31 @@ import { isWeb } from '../../hooks/useLayoutType'
const Compose = () => {
const { videos } = useUserData()
const isFocused = useIsFocused()
const route = useRoute()
const fromLyrics = route?.params?.fromLyrics === true
const [videoUrl, setVideoUrl] = useState(null)
useEffect(() => {
setVideoUrl(isWeb ? videos.malikWeb : videos?.malik)
}, [])
const handleBack = () => {
if (fromLyrics) {
navigate(Routes.BottomTab, {
screen: Routes.HomeStack,
params: {
screen: Routes.Home,
},
})
return
}
goBack()
}
return (
<Page backgroundImg={background.studioBG2} headerType="NONE">
<MusicLandHeader
onPressBack={goBack}
onPressBack={handleBack}
progress={9}
// logo={icons.musicLandStudio}
/>
@@ -38,7 +53,7 @@ const Compose = () => {
>
<GradientButton
title="Composer ma chanson"
onPress={() => navigate(Routes.ComposeSong)}
onPress={() => navigate(Routes.ComposeSong, fromLyrics ? { fromLyrics: true } : undefined)}
/>
</View>
</View>