interface ConversationPlayProps { translator: Translator; } function ConversationPlay (props : ConversationPlayProps) { const [language, setLanguage] = useState(languages[0].code); const [message, setMessage] = useState(''); const [conversation, setConversation] = useState(null); const startConversation = () => { const speaker: Speaker = { id: "user", language }; const newConversation = new Conversation(translator, speaker); setConversation(newConversation); }; const addMessage = async () => { if (conversation) { conversation.addMessage({ id: "user", language }, message); await conversation.translateLast(); setMessage(''); } }; return ( Select Language: {languages.map(lang => (