Fix some free response UI stuff up
This commit is contained in:
parent
8a501e8ab2
commit
74fcb55434
|
@ -105,8 +105,9 @@ export function FreeResponseContractCommentsActivity(props: {
|
||||||
const { bets, contract, comments, user, tips } = props
|
const { bets, contract, comments, user, tips } = props
|
||||||
|
|
||||||
let outcomes = uniq(bets.map((bet) => bet.outcome))
|
let outcomes = uniq(bets.map((bet) => bet.outcome))
|
||||||
outcomes = sortBy(outcomes, (outcome) =>
|
outcomes = sortBy(
|
||||||
getOutcomeProbability(contract, outcome)
|
outcomes,
|
||||||
|
(outcome) => -getOutcomeProbability(contract, outcome)
|
||||||
)
|
)
|
||||||
|
|
||||||
const answers = outcomes
|
const answers = outcomes
|
||||||
|
|
|
@ -107,12 +107,12 @@ export function FeedAnswerCommentGroup(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col
|
<Col
|
||||||
className={'relative flex-1 items-start gap-3'}
|
className={'relative flex-1 items-stretch gap-3'}
|
||||||
key={answer.id + 'comment'}
|
key={answer.id + 'comment'}
|
||||||
>
|
>
|
||||||
<Row
|
<Row
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'flex gap-3 space-x-3 pt-4 transition-all duration-1000',
|
'gap-3 space-x-3 pt-4 transition-all duration-1000',
|
||||||
highlighted ? `-m-2 my-3 rounded bg-indigo-500/[0.2] p-2` : ''
|
highlighted ? `-m-2 my-3 rounded bg-indigo-500/[0.2] p-2` : ''
|
||||||
)}
|
)}
|
||||||
id={answerElementId}
|
id={answerElementId}
|
||||||
|
@ -158,21 +158,23 @@ export function FeedAnswerCommentGroup(props: {
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
{answerComments.map((comment) => (
|
<Col className="gap-3 pl-1">
|
||||||
<FeedComment
|
{answerComments.map((comment) => (
|
||||||
key={comment.id}
|
<FeedComment
|
||||||
indent={true}
|
key={comment.id}
|
||||||
contract={contract}
|
indent={true}
|
||||||
comment={comment}
|
contract={contract}
|
||||||
tips={tips[comment.id]}
|
comment={comment}
|
||||||
betsBySameUser={betsByUserId[comment.userId] ?? []}
|
tips={tips[comment.id]}
|
||||||
onReplyClick={scrollAndOpenReplyInput}
|
betsBySameUser={betsByUserId[comment.userId] ?? []}
|
||||||
/>
|
onReplyClick={scrollAndOpenReplyInput}
|
||||||
))}
|
/>
|
||||||
|
))}
|
||||||
|
</Col>
|
||||||
{showReply && (
|
{showReply && (
|
||||||
<div className={'ml-6'}>
|
<div className={'relative ml-7'}>
|
||||||
<span
|
<span
|
||||||
className="absolute -ml-[1px] mt-[1.25rem] h-2 w-0.5 rotate-90 bg-gray-200"
|
className="absolute -left-1 -ml-[1px] mt-[1.25rem] h-2 w-0.5 rotate-90 bg-gray-200"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<CommentInput
|
<CommentInput
|
||||||
|
|
|
@ -155,7 +155,7 @@ export function FeedComment(props: {
|
||||||
<Row
|
<Row
|
||||||
id={comment.id}
|
id={comment.id}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'relative flex',
|
'relative',
|
||||||
indent ? 'ml-6' : '',
|
indent ? 'ml-6' : '',
|
||||||
highlighted ? `-m-1.5 rounded bg-indigo-500/[0.2] p-1.5` : ''
|
highlighted ? `-m-1.5 rounded bg-indigo-500/[0.2] p-1.5` : ''
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user