continue fix generating flow

This commit is contained in:
Thomas Demirdjian
2025-09-02 15:42:45 +02:00
parent d634c55aaa
commit 07053bc8db
10 changed files with 314 additions and 95 deletions
+10 -3
View File
@@ -10,6 +10,7 @@ import { navigate } from "../navigation/NavigationService";
import { useUserData } from "../providers/UserDataProvider";
import FontAwesome from "@expo/vector-icons/FontAwesome";
import palette from "../styles/Palette";
import GeneratingSong from "./Studio/GeneratingSong";
const CREATE_DATA = [
{
@@ -77,13 +78,19 @@ const NewMusicOptions = ({ route }) => {
});
break;
case 1:
navigate(Routes.Compose, { projectId: currentProjet.id });
if (currentProjet?.musicStatus === "GENERATING") {
navigate(Routes.GeneratingSong, { projectId: currentProjet.id });
} else if (currentProjet?.musicStatus === "GENERATED") {
navigate(Routes.SongReady, { projectId: currentProjet.id });
} else {
navigate(Routes.Compose, { projectId: currentProjet.id });
}
break;
case 2:
navigate(Routes.PouchReady, { projectId: currentProjet.id });
break;
default:
navigate(Routes.PouchReady, { projectId: currentProjet.id });
case 3:
navigate(Routes.Playback, { projectId: currentProjet.id });
break;
}
};