fix - redirection

This commit is contained in:
Victor
2025-09-17 14:32:47 +02:00
parent 5872e47f18
commit 2ef16e4be7
+29 -34
View File
@@ -1,18 +1,18 @@
import { View, Text, Image } from "react-native"; import { View, Text, Image } from 'react-native';
import React from "react"; import React from 'react';
import Page from "../../layouts/Page"; import Page from '../../layouts/Page';
import { background, img } from "../../assets"; import { background, img } from '../../assets';
import { goBack, navigate } from "../../navigation/NavigationService"; import { goBack, navigate } from '../../navigation/NavigationService';
import MusicLandHeader from "../../components/MusicLandHeader"; import MusicLandHeader from '../../components/MusicLandHeader';
import CreateLyricsHeader from "../Writing/components/CreateLyricsHeader"; import CreateLyricsHeader from '../Writing/components/CreateLyricsHeader';
import { size } from "../../styles/Style"; import { size } from '../../styles/Style';
import BorderGradientButton from "../../components/BorderGradientButton"; import BorderGradientButton from '../../components/BorderGradientButton';
import GradientButton from "../../components/GradientButton"; import GradientButton from '../../components/GradientButton';
import { responsiveHeight } from "react-native-responsive-dimensions"; import { responsiveHeight } from 'react-native-responsive-dimensions';
import { Palette } from "../../styles"; import { Palette } from '../../styles';
import { FONT_FAMILY } from "../../styles/Fonts"; import { FONT_FAMILY } from '../../styles/Fonts';
import { Routes } from "../../navigation"; import { Routes } from '../../navigation';
import { useRoute } from "@react-navigation/native"; import { useRoute } from '@react-navigation/native';
const SongDownloaded = () => { const SongDownloaded = () => {
const params = useRoute().params; const params = useRoute().params;
@@ -21,26 +21,24 @@ const SongDownloaded = () => {
return ( return (
<Page <Page
backgroundImg={ backgroundImg={
action === "playback" action === 'playback'
? background.playbackBG2 ? background.playbackBG2
: background.productionBG2 : background.productionBG2
} }
headerType="NONE" headerType='NONE'>
>
<MusicLandHeader onPressBack={goBack} progress={100} /> <MusicLandHeader onPressBack={goBack} progress={100} />
<View style={{ flex: 1, paddingTop: responsiveHeight(15) }}> <View style={{ flex: 1, paddingTop: responsiveHeight(15) }}>
<CreateLyricsHeader <CreateLyricsHeader
gradientProps={{ gradientProps={{
start: { x: 0, y: 0 }, start: { x: 0, y: 0 },
end: { x: 0, y: 1 }, end: { x: 0, y: 1 },
}} }}>
>
<Image <Image
source={img.placeholder2} source={img.placeholder2}
style={{ style={{
...size({ size: 158 }), ...size({ size: 158 }),
borderRadius: 13, borderRadius: 13,
alignSelf: "center", alignSelf: 'center',
}} }}
/> />
<View style={{ gap: 2, marginTop: 12 }}> <View style={{ gap: 2, marginTop: 12 }}>
@@ -49,19 +47,17 @@ const SongDownloaded = () => {
fontSize: 22, fontSize: 22,
color: Palette.white, color: Palette.white,
fontFamily: FONT_FAMILY.InterSemiBold, fontFamily: FONT_FAMILY.InterSemiBold,
textAlign: "center", textAlign: 'center',
}} }}>
> {action === 'playback' ? 'Playback' : 'Chanson'} téléchargée !
{action === "playback" ? "Playback" : "Chanson"} téléchargée !
</Text> </Text>
<Text <Text
style={{ style={{
fontSize: 16, fontSize: 16,
color: Palette.white, color: Palette.white,
fontFamily: FONT_FAMILY.InterMedium, fontFamily: FONT_FAMILY.InterMedium,
}} }}>
> {action === 'playback' ? 'Ton Playback' : 'Ta Chanson'} est
{action === "playback" ? "Ton Playback" : "Ta Chanson"} est
désormais téléchargée dans tes fichiers. Nhésite pas à la désormais téléchargée dans tes fichiers. Nhésite pas à la
partager avec tes proches. partager avec tes proches.
</Text> </Text>
@@ -71,17 +67,16 @@ const SongDownloaded = () => {
marginTop: 26, marginTop: 26,
gap: 12, gap: 12,
paddingBottom: 12, paddingBottom: 12,
width: "80%", width: '80%',
alignSelf: "center", alignSelf: 'center',
}} }}>
>
<BorderGradientButton <BorderGradientButton
title="Partager" title='Partager'
onPress={() => navigate(Routes.Production)} onPress={() => navigate(Routes.Production)}
/> />
<GradientButton <GradientButton
title="Page d'accueil" title="Page d'accueil"
onPress={() => navigate(Routes.Production)} onPress={() => navigate(Routes.BottomTab)}
/> />
</View> </View>
</CreateLyricsHeader> </CreateLyricsHeader>