diff --git a/components/admin/guide-section-editor.tsx b/components/admin/guide-section-editor.tsx
index 91c45d0..84a002c 100644
--- a/components/admin/guide-section-editor.tsx
+++ b/components/admin/guide-section-editor.tsx
@@ -4376,8 +4376,8 @@ function ExtraEditor({ guide, extraSectionId, initial, characters, weapons, arti
})),
})),
);
- const [openSectionIds, setOpenSectionIds] = useState(() =>
- initial.extras.map((section) => section.id),
+ const [openRowIds, setOpenRowIds] = useState(() =>
+ initial.extras.flatMap((section) => section.rows.map((row) => row.id)),
);
const value = {
sections: sections.map((section) => ({
@@ -4438,7 +4438,11 @@ function ExtraEditor({ guide, extraSectionId, initial, characters, weapons, arti
})),
}));
setSections(restoredSections);
- setOpenSectionIds(restoredSections.map((section) => section.clientId));
+ setOpenRowIds(
+ restoredSections.flatMap((section) =>
+ section.rows.map((row) => row.clientId),
+ ),
+ );
},
});
const handleRowDragEnd = (sectionId: string, { active, over }: DragEndEvent) => {
@@ -4462,15 +4466,9 @@ function ExtraEditor({ guide, extraSectionId, initial, characters, weapons, arti
-
- {sections.map((section, sectionIndex) => (
-
+ {sections.map((section, sectionIndex) => (
ลบส่วน
-
-
row.clientId)}
strategy={verticalListSortingStrategy}
>
+
{section.rows.map((row, rowIndex) => (
{(rowDragHandle) => (
+
ลบแถว
+
+
{row.imageUrl ? (
@@ -4965,16 +4970,21 @@ function ExtraEditor({ guide, extraSectionId, initial, characters, weapons, arti
+
+
)}
))}
+
-
-
- ))}
-
+ ))}
) : null}
{row.catalogItems.length ? (
-
+
{row.catalogItems.map((item) => (