feat: add drag and drop errors
This commit is contained in:
@@ -21,6 +21,7 @@ import SongTo from "./SongTo";
|
||||
import SpecificityContext from "./SpecificityContext";
|
||||
|
||||
const MAX_STEP_INDEX = 8;
|
||||
const CUSTOM_SANITIZE_OPTIONS = { autoInjectPreChorus: false };
|
||||
|
||||
const CreateLyricsWithAi = () => {
|
||||
const { selectedProject } = useUser();
|
||||
@@ -133,10 +134,10 @@ const CreateLyricsWithAi = () => {
|
||||
|
||||
// Structure personnalisée: prioriser selections.customStructure puis config.structure
|
||||
const savedCustom = Array.isArray(sel.customStructure)
|
||||
? sanitizeStructureList(sel.customStructure)
|
||||
? sanitizeStructureList(sel.customStructure, CUSTOM_SANITIZE_OPTIONS)
|
||||
: null;
|
||||
const cfgStructure = Array.isArray(cfg.structure)
|
||||
? sanitizeStructureList(cfg.structure)
|
||||
? sanitizeStructureList(cfg.structure, CUSTOM_SANITIZE_OPTIONS)
|
||||
: null;
|
||||
const fallbackStructure =
|
||||
savedCustom && savedCustom.length ? savedCustom : cfgStructure;
|
||||
@@ -201,7 +202,7 @@ const CreateLyricsWithAi = () => {
|
||||
: style || undefined;
|
||||
const sanitizedCustom =
|
||||
Array.isArray(customStructure) && customStructure.length > 0
|
||||
? sanitizeStructureList(customStructure)
|
||||
? sanitizeStructureList(customStructure, CUSTOM_SANITIZE_OPTIONS)
|
||||
: [];
|
||||
const sanitizedParsed = Array.isArray(parsedStructure)
|
||||
? sanitizeStructureList(parsedStructure)
|
||||
|
||||
Reference in New Issue
Block a user