diff --git a/apps/web/src/features/resume/editor/write/add-section.tsx b/apps/web/src/features/resume/editor/write/add-section.tsx index 53b8f6f62..7c3d0cc09 100644 --- a/apps/web/src/features/resume/editor/write/add-section.tsx +++ b/apps/web/src/features/resume/editor/write/add-section.tsx @@ -72,8 +72,9 @@ function addCustom(type: CustomSectionType) { } /** - * Add section: every section not in use, in two columns, plus Custom section, which asks for a type. The - * new section starts with one draft entry, open and focused. + * Add section: every section not in use, in two columns, plus Custom section, which asks for a type. Once every + * section is in use, the custom types are listed directly. The new section starts with one draft entry, open and + * focused. */ export function AddSectionMenu() { const added = useEditorStore((state) => state.addedSections); @@ -83,6 +84,12 @@ export function AddSectionMenu() { .join(","), ); const unused = unusedKey ? (unusedKey.split(",") as ("summary" | SectionType)[]) : []; + const customItems = CUSTOM_SECTION_TYPES.map((type) => ( + addCustom(type)}> + + {getSectionTitle(type)} + + )); return ( @@ -109,25 +116,30 @@ export function AddSectionMenu() { )} {unused.length > 0 && } - - - - Custom section - - - - - What goes in it? - - {CUSTOM_SECTION_TYPES.map((type) => ( - addCustom(type)}> - - {getSectionTitle(type)} - - ))} - - - + {unused.length > 0 ? ( + + + + Custom section + + + + + What goes in it? + + {customItems} + + + + ) : ( + // Every built-in section is in use, so the custom types are the only choice: list them here. + + + Custom section + + {customItems} + + )} );