import { createRef, useContext } from "react"; import { ChatStore } from "@/types/chatstore"; import { useEffect, useState, Dispatch } from "react"; import { Button } from "@/components/ui/button"; import { AudioWaveformIcon, CircleStopIcon, MicIcon } from "lucide-react"; import { AppContext } from "@/pages/App"; const WhisperButton = (props: { inputMsg: string; setInputMsg: Dispatch; }) => { const ctx = useContext(AppContext); if (!ctx) return
error
; const { chatStore } = ctx; const { inputMsg, setInputMsg } = props; const mediaRef = createRef(); const [isRecording, setIsRecording] = useState("Mic"); return ( ); }; export default WhisperButton;