fix type errors
This commit is contained in:
parent
3f401d933a
commit
e3aabdd916
1 changed files with 4 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ export const HistorySettings: React.FC = () => {
|
||||||
};
|
};
|
||||||
}, [loadHistoryEntries]);
|
}, [loadHistoryEntries]);
|
||||||
|
|
||||||
const toggleSaved = async (id: string) => {
|
const toggleSaved = async (id: number) => {
|
||||||
try {
|
try {
|
||||||
await commands.toggleHistoryEntrySaved(id);
|
await commands.toggleHistoryEntrySaved(id);
|
||||||
// No need to reload here - the event listener will handle it
|
// 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 {
|
try {
|
||||||
await commands.deleteHistoryEntry(id);
|
await commands.deleteHistoryEntry(id);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
@ -207,7 +207,7 @@ interface HistoryEntryProps {
|
||||||
onToggleSaved: () => void;
|
onToggleSaved: () => void;
|
||||||
onCopyText: () => void;
|
onCopyText: () => void;
|
||||||
getAudioUrl: (fileName: string) => Promise<string | null>;
|
getAudioUrl: (fileName: string) => Promise<string | null>;
|
||||||
deleteAudio: (id: string) => Promise<void>;
|
deleteAudio: (id: number) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HistoryEntryComponent: React.FC<HistoryEntryProps> = ({
|
const HistoryEntryComponent: React.FC<HistoryEntryProps> = ({
|
||||||
|
|
@ -244,7 +244,7 @@ const HistoryEntryComponent: React.FC<HistoryEntryProps> = ({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const formattedDate = formatDateTime(entry.timestamp, i18n.language);
|
const formattedDate = formatDateTime(String(entry.timestamp), i18n.language);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="px-4 py-2 pb-5 flex flex-col gap-3">
|
<div className="px-4 py-2 pb-5 flex flex-col gap-3">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue