No subpages. Create one to group albums under a custom URL path.
)}
{gallery.subpages.length > 0 && filteredSubpages.length === 0 && (
{(() => {
const sp = gallery.subpages[expandedSubpage];
const spIndex = expandedSubpage;
return (
<>
{/* Subpage metadata */}
{/* Albums (if no sections) with DnD */}
{(!sp.sections || sp.sections.length === 0) && (
Albums
`album-${a.id}-${i}`)}
strategy={verticalListSortingStrategy}
>
{sp.albums.map((album, aIndex) => (
removeSubpageAlbum(spIndex, aIndex)}
onEdit={() => setEditingAlbumAddress({ type: 'subpage', subpageIndex: spIndex, albumIndex: aIndex })}
/>
))}
)}
{/* Sections */}
{sp.sections && sp.sections.length > 0 && (
{sp.sections.map((sec, secIndex) => (
updateSection(spIndex, secIndex, { title: e.target.value })
}
placeholder="Section title"
/>
updateSection(spIndex, secIndex, {
description: e.target.value || undefined,
})
}
placeholder="Section description (optional)"
className="section-desc-input"
/>
{sec.albums.map((album, aIndex) => (
removeSectionAlbum(spIndex, secIndex, aIndex)}
onEdit={() => setEditingAlbumAddress({ type: 'section', subpageIndex: spIndex, sectionIndex: secIndex, albumIndex: aIndex })}
/>
))}
))}
)}
{sp.sections && sp.sections.length > 0 && (
)}
>
);
})()}
)}