fix build issues

This commit is contained in:
EthanHealy01 2025-08-15 20:05:39 +01:00
parent 34566cbae9
commit d2353c5db1
2 changed files with 5 additions and 6 deletions

View File

@ -5,7 +5,6 @@
import React, { createContext, useContext, useReducer, useCallback, useMemo } from 'react'; import React, { createContext, useContext, useReducer, useCallback, useMemo } from 'react';
import { useToolManagement } from '../hooks/useToolManagement'; import { useToolManagement } from '../hooks/useToolManagement';
import { ToolConfiguration } from '../types/tool';
import { PageEditorFunctions } from '../types/pageEditor'; import { PageEditorFunctions } from '../types/pageEditor';
import { ToolRegistryEntry } from '../data/toolRegistry'; import { ToolRegistryEntry } from '../data/toolRegistry';
@ -70,7 +69,7 @@ function toolWorkflowReducer(state: ToolWorkflowState, action: ToolWorkflowActio
interface ToolWorkflowContextValue extends ToolWorkflowState { interface ToolWorkflowContextValue extends ToolWorkflowState {
// Tool management (from hook) // Tool management (from hook)
selectedToolKey: string | null; selectedToolKey: string | null;
selectedTool: ToolConfiguration | null; selectedTool: ToolRegistryEntry | null;
toolRegistry: any; // From useToolManagement toolRegistry: any; // From useToolManagement
// UI Actions // UI Actions

View File

@ -24,17 +24,17 @@ function HomePageContent() {
const { setMaxFiles, setIsToolMode, setSelectedFiles } = useFileSelection(); const { setMaxFiles, setIsToolMode, setSelectedFiles } = useFileSelection();
const { selectedTool } = useToolWorkflow(); const { selectedTool, selectedToolKey } = useToolWorkflow();
const baseUrl = getBaseUrl(); const baseUrl = getBaseUrl();
// Update document meta when tool changes // Update document meta when tool changes
useDocumentMeta({ 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)'), 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)'), 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 ogUrl: selectedTool ? `${baseUrl}${window.location.pathname}` : baseUrl
}); });