Custom add and create flow polish

This commit is contained in:
adilallo
2026-05-08 20:32:24 -06:00
parent 26bcd61ea3
commit 026a1e6d71
68 changed files with 6208 additions and 527 deletions
+10 -1
View File
@@ -13,6 +13,15 @@ export function mergePresetMethodsWithCustom<
meta: Record<string, { label: string; supportText: string }> | undefined,
): T[] {
const presetIds = new Set(presets.map((p) => p.id));
const presetRows = presets.map((p) => {
const row = meta?.[p.id];
if (!row) return p;
return {
...p,
label: row.label,
supportText: row.supportText,
} as T;
});
const customRows: T[] = [];
const seenCustom = new Set<string>();
@@ -28,5 +37,5 @@ export function mergePresetMethodsWithCustom<
} as T);
}
return [...presets, ...customRows];
return [...presetRows, ...customRows];
}