modal transition
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
sanitizeStructureList,
|
||||
segmentRequiresLyrics,
|
||||
} from "../../utils/songStructure";
|
||||
import { getStageAction } from "../../utils/projectStages";
|
||||
import CustomInput from "./components/CustomInput";
|
||||
|
||||
const Lyrics = ({ navigation }) => {
|
||||
@@ -264,17 +265,49 @@ const Lyrics = ({ navigation }) => {
|
||||
if (!isSame) {
|
||||
updateData.musicUrls = firebase.firestore.FieldValue.delete();
|
||||
updateData.musicStatus = firebase.firestore.FieldValue.delete();
|
||||
await projectsRef
|
||||
.doc(selectedProjectId)
|
||||
.set(updateData, { merge: true });
|
||||
}
|
||||
navigate(Routes.BottomTab, {
|
||||
screen: Routes.HomeStack,
|
||||
params: {
|
||||
screen: Routes.Home,
|
||||
params: { showLyricsCongrats: true },
|
||||
},
|
||||
});
|
||||
await projectsRef
|
||||
.doc(selectedProjectId)
|
||||
.set(updateData, { merge: true });
|
||||
const projectForStage = {
|
||||
...selectedProject,
|
||||
title: titleTrimmed,
|
||||
lyrics: normalizedNewLyrics,
|
||||
config: sanitize(projectConfig),
|
||||
selections: sanitize(projectSelections),
|
||||
hasLyrics: true,
|
||||
};
|
||||
if (!isSame) {
|
||||
projectForStage.musicUrls = undefined;
|
||||
projectForStage.musicStatus = undefined;
|
||||
}
|
||||
const beatmakerStage = getStageAction("beatmaker", projectForStage);
|
||||
await setIsLoading(false);
|
||||
alert(
|
||||
"Céline",
|
||||
"Bravo ! Vous venez de terminer de créer les paroles de votre musique ! Maintenant vous pouvez passer à la prochaine étape : le Studio avec Malik. Dans cette étape vous allez pouvoir donner vie à votre chanson !",
|
||||
[
|
||||
{
|
||||
text: "Retour à l'accueil",
|
||||
style: "cancel",
|
||||
onPress: () =>
|
||||
navigate(Routes.BottomTab, {
|
||||
screen: Routes.HomeStack,
|
||||
params: {
|
||||
screen: Routes.Home,
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
text: "Continuer avec Malik",
|
||||
onPress: () => {
|
||||
const targetRoute = beatmakerStage?.route || Routes.Compose;
|
||||
navigate(targetRoute, beatmakerStage?.params);
|
||||
},
|
||||
},
|
||||
]
|
||||
);
|
||||
return;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
alertMessage("Erreur", "Échec de l'enregistrement dans le projet.");
|
||||
@@ -293,6 +326,7 @@ const Lyrics = ({ navigation }) => {
|
||||
selectedProjectId,
|
||||
projectHasLyrics,
|
||||
projectLyrics,
|
||||
selectedProject,
|
||||
]);
|
||||
|
||||
const typeOccurrences = {};
|
||||
|
||||
Reference in New Issue
Block a user