import { View, Text, Image } from "react-native"; import React, { useState } from "react"; import Page from "../../layouts/Page"; import { background, img } from "../../assets"; import MusicLandHeader from "../../components/MusicLandHeader"; import { goBack, navigate } from "../../navigation/NavigationService"; import { responsiveHeight } from "react-native-responsive-dimensions"; import CreateLyricsHeader from "../Writing/components/CreateLyricsHeader"; import Style, { size } from "../../styles/Style"; import { Palette } from "../../styles"; import { FONT_FAMILY } from "../../styles/Fonts"; import { Routes } from "../../navigation"; import { useRoute } from "@react-navigation/core"; const DownloadPrices = () => { const params = useRoute().params; const action = params?.action; const [selectedIndex, setSelectedIndex] = useState(null); const PRICES = [ { title: action === "playback" ? "1 Playback" : "Je télécharge ma chanson", description: `Ce ${ action === "playback" ? "Playback" : "morceau" } uniquement`, price: "6,99€", }, { title: `3 ${action === "playback" ? "Playbacks" : "chansons"}`, description: `Ce ${ action === "playback" ? "Playback" : "morceau" } et les 2 prochains que tu crées`, price: "12,99€", }, { title: `5 ${action === "playback" ? "Playbacks" : "chansons"}`, description: `Ce ${ action === "playback" ? "Playback" : "morceau" } et les 4 prochains que tu crées`, price: "19,99€", recommended: true, }, ]; return ( Tarifs {PRICES.map((item, index) => ( { setSelectedIndex(index); navigate(Routes.SongDownloaded, { action, }); }} > {item.title} {item.description} {item.price} {item.recommended && ( Recommandé )} ))} ); }; export default DownloadPrices;