diff --git a/web/components/answers-panel.tsx b/web/components/answers-panel.tsx index ccc3a65b..3745bced 100644 --- a/web/components/answers-panel.tsx +++ b/web/components/answers-panel.tsx @@ -7,6 +7,12 @@ import { Contract } from '../../common/contract' import { AmountInput } from './amount-input' import { Col } from './layout/col' import { createAnswer } from '../lib/firebase/api-call' +import { Row } from './layout/row' +import { Avatar } from './avatar' +import { SiteLink } from './site-link' +import { DateTimeTooltip } from './datetime-tooltip' +import dayjs from 'dayjs' +import { BuyButton } from './yes-no-selector' export function AnswersPanel(props: { contract: Contract<'MULTI'> @@ -15,11 +21,48 @@ export function AnswersPanel(props: { const { contract, answers } = props return ( - - + {answers.map((answer) => ( -
{answer.text}
+ ))} + + + ) +} + +function AnswerItem(props: { answer: Answer; contract: Contract<'MULTI'> }) { + const { answer, contract } = props + const { username, avatarUrl, name, createdTime } = answer + + const createdDate = dayjs(createdTime).format('MMM D') + + return ( + + +
{answer.text}
+ + + + + +
{name}
+
+
+ +
+ +
+ + {createdDate} + +
+
+ + + {}} + /> ) } @@ -55,40 +98,40 @@ function CreateAnswerInput(props: { contract: Contract<'MULTI'> }) { } return ( - -
Add your answer
-