refactor: Enhance ScriptAccordion and Sidebar components to support selectedCategory state (#7405)

* refactor: Enhance ScriptAccordion and Sidebar components to support selectedCategory state

* lint

* chore: Add ESLint configuration to ignore errors during builds in next.config.mjs
This commit is contained in:
Bram Suurd
2025-09-05 07:24:19 +02:00
committed by GitHub
parent bf05dabc4c
commit 62264f37a6
5 changed files with 51 additions and 30 deletions

View File

@@ -8,10 +8,14 @@ function Sidebar({
items,
selectedScript,
setSelectedScript,
selectedCategory,
setSelectedCategory,
}: {
items: Category[];
selectedScript: string | null;
setSelectedScript: (script: string | null) => void;
selectedCategory: string | null;
setSelectedCategory: (category: string | null) => void;
}) {
const uniqueScripts = items.reduce((acc, category) => {
for (const script of category.scripts) {
@@ -37,6 +41,8 @@ function Sidebar({
items={items}
selectedScript={selectedScript}
setSelectedScript={setSelectedScript}
selectedCategory={selectedCategory}
setSelectedCategory={setSelectedCategory}
/>
</div>
</div>