feat: assets
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user