diff --git a/src/settings.tsx b/src/settings.tsx index b35c6b0..c96d824 100644 --- a/src/settings.tsx +++ b/src/settings.tsx @@ -266,8 +266,6 @@ export default (props: { const [totalCost, setTotalCost] = useState(getTotalCost()); // @ts-ignore const { langCode, setLangCode } = useContext(langCodeContext); - // type is MediaDeviceInfo - const [devices, setDevices] = useState([] as MediaDeviceInfo[]); useEffect(() => { const handleKeyPress = (event: any) => { diff --git a/src/tts.tsx b/src/tts.tsx index bbfe79e..ae11fb5 100644 --- a/src/tts.tsx +++ b/src/tts.tsx @@ -1,3 +1,4 @@ +import { useState } from "preact/hooks"; import { ChatStore, addTotalCost } from "./app"; interface TTSProps { @@ -6,6 +7,7 @@ interface TTSProps { text: string; } export default function TTSButton(props: TTSProps) { + const [generating, setGenerating] = useState(false); return ( ); }