diff --git a/apps/fronted/src/components/editor/SidePanel.tsx b/apps/fronted/src/components/editor/SidePanel.tsx index fce339a..dfd4996 100644 --- a/apps/fronted/src/components/editor/SidePanel.tsx +++ b/apps/fronted/src/components/editor/SidePanel.tsx @@ -216,7 +216,11 @@ export function SidePanel() { updateMenuSections( menuSections.filter((section) => section.id !== item.id) ); - setActiveSection(menuSections[0].id); + setActiveSection( + menuSections[ + menuSections.findIndex((s) => s.id === item.id) - 1 + ].id + ); }} className={cn( "p-1.5 rounded-md text-primary",