import { createRef, useContext } from "react"; import { useState, Dispatch } from "react"; import { Button } from "@/components/ui/button"; import { AudioWaveformIcon, CircleStopIcon, MicIcon } from "lucide-react"; import { AppChatStoreContext, AppContext } from "@/pages/App"; const WhisperButton = (props: { inputMsg: string; setInputMsg: Dispatch; }) => { const { chatStore } = useContext(AppChatStoreContext); const { inputMsg, setInputMsg } = props; const mediaRef = createRef(); const [isRecording, setIsRecording] = useState("Mic"); return ( <> {chatStore.whisper_api && chatStore.whisper_key ? ( ) : ( )} Use Microphone ); }; export default WhisperButton;