From 952b7be94acb05032d1aae0d359d673ce04d4f60 Mon Sep 17 00:00:00 2001
From: Austin Chen from Feed
* Show a mini-feed under each FR answer
* Expand row on click
* Show feed item for FR answer submission
* Fix build
---
web/components/answers/answer-item.tsx | 53 +++++----
web/components/contract-feed.tsx | 159 +++++++++++++++++--------
2 files changed, 137 insertions(+), 75 deletions(-)
diff --git a/web/components/answers/answer-item.tsx b/web/components/answers/answer-item.tsx
index 7952a347..51ea9631 100644
--- a/web/components/answers/answer-item.tsx
+++ b/web/components/answers/answer-item.tsx
@@ -8,13 +8,12 @@ import { Col } from '../layout/col'
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'
import { formatPercent } from '../../../common/util/format'
import { getOutcomeProbability } from '../../../common/calculate'
import { tradingAllowed } from '../../lib/firebase/contracts'
import { AnswerBetPanel } from './answer-bet-panel'
+import { ContractFeed } from '../contract-feed'
export function AnswerItem(props: {
answer: Answer
@@ -35,10 +34,9 @@ export function AnswerItem(props: {
onDeselect,
} = props
const { resolution, resolutions, totalShares } = contract
- const { username, avatarUrl, name, createdTime, number, text } = answer
+ const { username, avatarUrl, name, number, text } = answer
const isChosen = chosenProb !== undefined
- const createdDate = dayjs(createdTime).format('MMM D')
const prob = getOutcomeProbability(totalShares, answer.id)
const roundedProb = Math.round(prob * 100)
const probPercent = formatPercent(prob)
@@ -48,41 +46,44 @@ export function AnswerItem(props: {
const [isBetting, setIsBetting] = useState(false)
return (
-