end of tickets
This commit is contained in:
@@ -37,6 +37,12 @@ const Lyrics = ({ navigation }) => {
|
||||
const [containerLayout, setContainerLayout] = useState(null);
|
||||
const { setIsLoading } = useMinuit();
|
||||
const { selectedProjectId, selectedProject } = useUser();
|
||||
const hasExistingMusicDraft = useMemo(() => {
|
||||
if (!Array.isArray(selectedProject?.musicUrls)) return false;
|
||||
return selectedProject.musicUrls.some(
|
||||
(url) => typeof url === "string" && url.trim()
|
||||
);
|
||||
}, [selectedProject?.musicUrls]);
|
||||
const [isFocus, setIsFocus] = useState(null);
|
||||
const [itemsContainerLayout, setItemsContainerLayout] = useState([]);
|
||||
const [sensitiveContentModal, setSensitiveContentModal] = useState({
|
||||
@@ -306,6 +312,14 @@ const Lyrics = ({ navigation }) => {
|
||||
}
|
||||
const beatmakerStage = getStageAction("beatmaker", projectForStage);
|
||||
await setIsLoading(false);
|
||||
if (hasExistingMusicDraft) {
|
||||
navigate(Routes.ComposeSong, { isRegeneration: true });
|
||||
return;
|
||||
}
|
||||
const handleNavigateToStudio = () => {
|
||||
const targetRoute = beatmakerStage?.route || Routes.Compose;
|
||||
navigate(targetRoute, beatmakerStage?.params);
|
||||
};
|
||||
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 pour donner vie à votre chanson !",
|
||||
@@ -323,10 +337,7 @@ const Lyrics = ({ navigation }) => {
|
||||
},
|
||||
{
|
||||
text: "Continuer vers le Studio",
|
||||
onPress: () => {
|
||||
const targetRoute = beatmakerStage?.route || Routes.Compose;
|
||||
navigate(targetRoute, beatmakerStage?.params);
|
||||
},
|
||||
onPress: handleNavigateToStudio,
|
||||
},
|
||||
]
|
||||
);
|
||||
@@ -350,6 +361,7 @@ const Lyrics = ({ navigation }) => {
|
||||
projectHasLyrics,
|
||||
projectLyrics,
|
||||
selectedProject,
|
||||
hasExistingMusicDraft,
|
||||
]);
|
||||
|
||||
const typeOccurrences = {};
|
||||
|
||||
Reference in New Issue
Block a user