mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-05 10:52:49 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user