update
This commit is contained in:
@@ -10,31 +10,47 @@ import Style, { size } from "../../styles/Style";
|
||||
import { Palette } from "../../styles";
|
||||
import { FONT_FAMILY } from "../../styles/Fonts";
|
||||
import { Routes } from "../../navigation";
|
||||
|
||||
const PRICES = [
|
||||
{
|
||||
title: "Je télécharge ma chanson",
|
||||
description: "Ce morceau uniquement",
|
||||
price: "6,99€",
|
||||
},
|
||||
{
|
||||
title: "3 chansons",
|
||||
description: "Ce morceau et les 2 prochains que tu crées",
|
||||
price: "12,99€",
|
||||
},
|
||||
{
|
||||
title: "5 chansons",
|
||||
description: "Ce morceau et les 4 prochains que tu crées",
|
||||
price: "19,99€",
|
||||
recommended: true,
|
||||
},
|
||||
];
|
||||
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 (
|
||||
<Page backgroundImg={background.productionBG2} headerType="NONE">
|
||||
<Page
|
||||
backgroundImg={
|
||||
action === "playback"
|
||||
? background.playbackBG2
|
||||
: background.productionBG2
|
||||
}
|
||||
headerType="NONE"
|
||||
>
|
||||
<MusicLandHeader onPressBack={goBack} progress={75} />
|
||||
<View style={{ flex: 1, paddingTop: responsiveHeight(10) }}>
|
||||
<CreateLyricsHeader
|
||||
@@ -74,7 +90,9 @@ const DownloadPrices = () => {
|
||||
tint={!item.recommended ? "dark" : "light"}
|
||||
onPress={() => {
|
||||
setSelectedIndex(index);
|
||||
navigate(Routes.SongDownloaded);
|
||||
navigate(Routes.SongDownloaded, {
|
||||
action,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<View style={{ paddingTop: 5 }}>
|
||||
|
||||
Reference in New Issue
Block a user