import {GHButton} from "./Button"; import React, {FormEvent, FunctionComponent, RefObject} from "react"; interface Props{ chatRef: RefObject; handleSend: (message: string) => void; } const Chat: FunctionComponent = ({chatRef, handleSend}) => { const handleChat = (form: FormEvent) => { form.preventDefault(); const data = new FormData(form.currentTarget); const chatInput = data.get("chat-input") as string; if(!chatInput) return; handleSend(chatInput); form.currentTarget.reset(); } return ( <>
    Send
    ) } export default Chat;