diff --git a/frontend/src/contexts/ToolWorkflowContext.tsx b/frontend/src/contexts/ToolWorkflowContext.tsx index ba9afb965..7d2222e5d 100644 --- a/frontend/src/contexts/ToolWorkflowContext.tsx +++ b/frontend/src/contexts/ToolWorkflowContext.tsx @@ -5,7 +5,6 @@ import React, { createContext, useContext, useReducer, useCallback, useMemo } from 'react'; import { useToolManagement } from '../hooks/useToolManagement'; -import { ToolConfiguration } from '../types/tool'; import { PageEditorFunctions } from '../types/pageEditor'; import { ToolRegistryEntry } from '../data/toolRegistry'; @@ -70,7 +69,7 @@ function toolWorkflowReducer(state: ToolWorkflowState, action: ToolWorkflowActio interface ToolWorkflowContextValue extends ToolWorkflowState { // Tool management (from hook) selectedToolKey: string | null; - selectedTool: ToolConfiguration | null; + selectedTool: ToolRegistryEntry | null; toolRegistry: any; // From useToolManagement // UI Actions diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 3e6060dad..d26a40caa 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -24,17 +24,17 @@ function HomePageContent() { const { setMaxFiles, setIsToolMode, setSelectedFiles } = useFileSelection(); - const { selectedTool } = useToolWorkflow(); + const { selectedTool, selectedToolKey } = useToolWorkflow(); const baseUrl = getBaseUrl(); // Update document meta when tool changes useDocumentMeta({ - title: selectedTool?.title ? `${selectedTool.title} - Stirling PDF` : 'Stirling PDF', + title: selectedTool ? `${selectedTool.name} - Stirling PDF` : 'Stirling PDF', description: selectedTool?.description || t('app.description', 'The Free Adobe Acrobat alternative (10M+ Downloads)'), - ogTitle: selectedTool?.title ? `${selectedTool.title} - Stirling PDF` : 'Stirling PDF', + ogTitle: selectedTool ? `${selectedTool.name} - Stirling PDF` : 'Stirling PDF', ogDescription: selectedTool?.description || t('app.description', 'The Free Adobe Acrobat alternative (10M+ Downloads)'), - ogImage: selectedTool ? `${baseUrl}/og_images/${selectedTool.id}.png` : `${baseUrl}/og_images/home.png`, + ogImage: selectedToolKey ? `${baseUrl}/og_images/${selectedToolKey}.png` : `${baseUrl}/og_images/home.png`, ogUrl: selectedTool ? `${baseUrl}${window.location.pathname}` : baseUrl });