From ae557286c34f52f9601136b1080e7a029819cc98 Mon Sep 17 00:00:00 2001 From: Connor Yoh Date: Fri, 22 Aug 2025 14:23:45 +0100 Subject: [PATCH] Type fixes --- frontend/src/components/tools/automate/ToolSelector.tsx | 6 +++--- frontend/src/components/tools/shared/renderToolButtons.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/tools/automate/ToolSelector.tsx b/frontend/src/components/tools/automate/ToolSelector.tsx index 9e7635016..80b68b0a4 100644 --- a/frontend/src/components/tools/automate/ToolSelector.tsx +++ b/frontend/src/components/tools/automate/ToolSelector.tsx @@ -80,10 +80,10 @@ export default function ToolSelector({ setSearchTerm(''); // Clear search to show the selected tool display }, [onSelect]); - const renderedTools = useMemo(() => + const renderedTools = useMemo(() => displayGroups.map((subcategory) => - renderToolButtons(subcategory, null, handleToolSelect, !isSearching) - ), [displayGroups, handleToolSelect, isSearching] + renderToolButtons(t, subcategory, null, handleToolSelect, !isSearching) + ), [displayGroups, handleToolSelect, isSearching, t] ); const handleSearchFocus = () => { diff --git a/frontend/src/components/tools/shared/renderToolButtons.tsx b/frontend/src/components/tools/shared/renderToolButtons.tsx index 1347f20b1..eb9c9be6d 100644 --- a/frontend/src/components/tools/shared/renderToolButtons.tsx +++ b/frontend/src/components/tools/shared/renderToolButtons.tsx @@ -11,8 +11,8 @@ import { SubcategoryGroup } from '../../../hooks/useToolSections'; export const renderToolButtons = ( t: TFunction, subcategory: SubcategoryGroup, - selectedToolKey: String | null, - onSelect: (id: String) => void, + selectedToolKey: string | null, + onSelect: (id: string) => void, showSubcategoryHeader: boolean = true ) => (