import { useState } from 'react' import { createComment } from '../lib/firebase/comments' import { User } from '../lib/firebase/users' export function CommentBox(props: { className?: string contractId: string betId: string user: User | null | undefined }) { const { className, contractId, betId, user } = props const [comment, setComment] = useState('') async function submitComment() { if (!user || !comment) return await createComment(contractId, betId, comment, user) } return (