more fixes and changes, crash, design …
This commit is contained in:
@@ -175,7 +175,7 @@ const ComposeSong = () => {
|
||||
const persistMusicConfig = useCallback(async () => {
|
||||
try {
|
||||
if (!selectedProjectId) return;
|
||||
await updateProjectData({
|
||||
const payload = {
|
||||
musicConfig: {
|
||||
title: musicConfig?.title || "",
|
||||
lyrics: Array.isArray(musicConfig?.lyrics) ? musicConfig.lyrics : [],
|
||||
@@ -188,10 +188,20 @@ const ComposeSong = () => {
|
||||
},
|
||||
musicStatus: null,
|
||||
sunoTaskId: firebase.firestore.FieldValue.delete(),
|
||||
musicUrls: firebase.firestore.FieldValue.delete(),
|
||||
});
|
||||
};
|
||||
|
||||
if (!isRegenerationFlow) {
|
||||
payload.musicUrls = firebase.firestore.FieldValue.delete();
|
||||
}
|
||||
|
||||
await updateProjectData(payload);
|
||||
} catch (_error) {}
|
||||
}, [musicConfig, selectedProjectId, updateProjectData]);
|
||||
}, [
|
||||
isRegenerationFlow,
|
||||
musicConfig,
|
||||
selectedProjectId,
|
||||
updateProjectData,
|
||||
]);
|
||||
|
||||
const spendCoinsForGeneration = useCallback(async () => {
|
||||
if (!currentUID) {
|
||||
|
||||
Reference in New Issue
Block a user