diff --git a/src/components/admin/SettingsTreeSidebar.tsx b/src/components/admin/SettingsTreeSidebar.tsx index 68ac48e..8454bae 100644 --- a/src/components/admin/SettingsTreeSidebar.tsx +++ b/src/components/admin/SettingsTreeSidebar.tsx @@ -56,6 +56,8 @@ export function SettingsTreeSidebar({ const translatedName = t(`admin.settings.settingNames.${formattedKey}`, formattedKey); if (translatedName.toLowerCase().includes(q)) return true; if (s.hint?.description?.toLowerCase().includes(q)) return true; + const categoryLabel = t(`admin.settings.categories.${s.category.key}`, s.category.key); + if (categoryLabel.toLowerCase().includes(q)) return true; return false; }) .slice(0, 8) diff --git a/src/pages/AdminSettings.tsx b/src/pages/AdminSettings.tsx index 955b9f4..857a289 100644 --- a/src/pages/AdminSettings.tsx +++ b/src/pages/AdminSettings.tsx @@ -106,7 +106,8 @@ export default function AdminSettings() { label: t(`admin.settings.categories.${key}`, key), settings, })); - }, [activeTreeInfo, allSettings, t]); + // eslint-disable-next-line react-hooks/exhaustive-deps -- activeTreeInfo derived from activeSection + }, [activeSection, allSettings, t]); // Filter settings for search - GLOBAL search across all settings const filteredSettings = useMemo(() => { @@ -168,7 +169,8 @@ export default function AdminSettings() { if (activeTreeInfo) return t(`admin.settings.tree.${activeTreeInfo.child.id}`); return t('admin.settings.title'); - }, [activeSection, activeTreeInfo, t]); + // eslint-disable-next-line react-hooks/exhaustive-deps -- activeTreeInfo derived from activeSection + }, [activeSection, t]); // Render content based on active section const renderContent = () => {