modal transition
This commit is contained in:
@@ -21,6 +21,7 @@ import useDataFromRef from "../../hooks/useDataFromRef";
|
||||
import { isWeb } from "../../hooks/useLayoutType.js";
|
||||
import Page from "../../layouts/Page";
|
||||
import { navigate } from "../../navigation/NavigationService";
|
||||
import { Routes } from "../../navigation/Routes";
|
||||
import { useUser } from "../../providers/UserDataProvider";
|
||||
import { Palette } from "../../styles";
|
||||
import {
|
||||
@@ -217,14 +218,43 @@ const Home = ({ navigation, route }) => {
|
||||
}, [handleDeleteProject, menuProject?.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (route?.params?.showLyricsCongrats) {
|
||||
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 !"
|
||||
);
|
||||
navigation?.setParams?.({ showLyricsCongrats: false });
|
||||
if (!route?.params?.showLyricsCongrats) {
|
||||
return;
|
||||
}
|
||||
}, [navigation, route?.params?.showLyricsCongrats]);
|
||||
const beatmakerStage = currentProject
|
||||
? getStageAction("beatmaker", currentProject)
|
||||
: null;
|
||||
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",
|
||||
},
|
||||
{
|
||||
text: "Continuer avec Malik",
|
||||
onPress: () => {
|
||||
if (!currentProject?.id) {
|
||||
return;
|
||||
}
|
||||
if (selectedProject?.id !== currentProject.id) {
|
||||
selectProject(currentProject.id);
|
||||
}
|
||||
const targetRoute = beatmakerStage?.route || Routes.Compose;
|
||||
navigate(targetRoute, beatmakerStage?.params);
|
||||
},
|
||||
},
|
||||
]
|
||||
);
|
||||
navigation?.setParams?.({ showLyricsCongrats: false });
|
||||
}, [
|
||||
currentProject,
|
||||
navigation,
|
||||
selectProject,
|
||||
selectedProject?.id,
|
||||
route?.params?.showLyricsCongrats,
|
||||
]);
|
||||
|
||||
const activeStage =
|
||||
stageStates[activeStageIndex] || stageStates[preferredStageIndex];
|
||||
|
||||
Reference in New Issue
Block a user