From e3aabdd9163ce137d491ce9a542bea606bad4601 Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Fri, 19 Dec 2025 11:53:10 +0700 Subject: [PATCH] fix type errors --- src/components/settings/history/HistorySettings.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/settings/history/HistorySettings.tsx b/src/components/settings/history/HistorySettings.tsx index 6e06c9e..e1d9c3c 100644 --- a/src/components/settings/history/HistorySettings.tsx +++ b/src/components/settings/history/HistorySettings.tsx @@ -72,7 +72,7 @@ export const HistorySettings: React.FC = () => { }; }, [loadHistoryEntries]); - const toggleSaved = async (id: string) => { + const toggleSaved = async (id: number) => { try { await commands.toggleHistoryEntrySaved(id); // No need to reload here - the event listener will handle it @@ -102,7 +102,7 @@ export const HistorySettings: React.FC = () => { } }; - const deleteAudioEntry = async (id: string) => { + const deleteAudioEntry = async (id: number) => { try { await commands.deleteHistoryEntry(id); } catch (error) { @@ -207,7 +207,7 @@ interface HistoryEntryProps { onToggleSaved: () => void; onCopyText: () => void; getAudioUrl: (fileName: string) => Promise; - deleteAudio: (id: string) => Promise; + deleteAudio: (id: number) => Promise; } const HistoryEntryComponent: React.FC = ({ @@ -244,7 +244,7 @@ const HistoryEntryComponent: React.FC = ({ } }; - const formattedDate = formatDateTime(entry.timestamp, i18n.language); + const formattedDate = formatDateTime(String(entry.timestamp), i18n.language); return (