diff --git a/web/components/comment-input.tsx b/web/components/comment-input.tsx index a7798c63..291abd1b 100644 --- a/web/components/comment-input.tsx +++ b/web/components/comment-input.tsx @@ -1,4 +1,5 @@ -import { PaperAirplaneIcon, XIcon } from '@heroicons/react/solid' +import { PaperAirplaneIcon, XCircleIcon, XIcon } from '@heroicons/react/solid' +import { scrollIntoView } from '@tiptap/core/dist/packages/core/src/commands' import { Editor } from '@tiptap/react' import clsx from 'clsx' import { Answer } from 'common/answer' @@ -70,6 +71,42 @@ export function CommentInput(props: { ) } +export function AnswerCommentInput(props: { + contract: Contract + answerResponse: Answer + onCancelAnswerResponse?: () => void +}) { + const { contract, answerResponse, onCancelAnswerResponse } = props + const [replyTo, _setReplyTo] = useState({ + id: answerResponse.id, + username: answerResponse.username, + }) + + return ( + <> + + + + +
+ +
+
+ + +
+
+ + ) +} export function CommentInputTextArea(props: { user: User | undefined | null @@ -157,42 +194,3 @@ export function CommentInputTextArea(props: { ) } - -export function AnswerCommentInput(props: { - contract: Contract - answerResponse: Answer - onCancelAnswerResponse?: () => void -}) { - const { contract, answerResponse, onCancelAnswerResponse } = props - // const [replyTo, setReplyTo] = useState({ - // id: answerResponse.id, - // username: answerResponse.username, - // }) - - return ( - <> - - - - -
- -
-
- -
- -
- - ) -}