Fix some free response UI stuff up

This commit is contained in:
Marshall Polaris 2022-08-30 02:29:57 -07:00
parent 8a501e8ab2
commit 74fcb55434
3 changed files with 21 additions and 18 deletions

View File

@ -105,8 +105,9 @@ export function FreeResponseContractCommentsActivity(props: {
const { bets, contract, comments, user, tips } = props
let outcomes = uniq(bets.map((bet) => bet.outcome))
outcomes = sortBy(outcomes, (outcome) =>
getOutcomeProbability(contract, outcome)
outcomes = sortBy(
outcomes,
(outcome) => -getOutcomeProbability(contract, outcome)
)
const answers = outcomes

View File

@ -107,12 +107,12 @@ export function FeedAnswerCommentGroup(props: {
return (
<Col
className={'relative flex-1 items-start gap-3'}
className={'relative flex-1 items-stretch gap-3'}
key={answer.id + 'comment'}
>
<Row
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` : ''
)}
id={answerElementId}
@ -158,21 +158,23 @@ export function FeedAnswerCommentGroup(props: {
)}
</Col>
</Row>
{answerComments.map((comment) => (
<FeedComment
key={comment.id}
indent={true}
contract={contract}
comment={comment}
tips={tips[comment.id]}
betsBySameUser={betsByUserId[comment.userId] ?? []}
onReplyClick={scrollAndOpenReplyInput}
/>
))}
<Col className="gap-3 pl-1">
{answerComments.map((comment) => (
<FeedComment
key={comment.id}
indent={true}
contract={contract}
comment={comment}
tips={tips[comment.id]}
betsBySameUser={betsByUserId[comment.userId] ?? []}
onReplyClick={scrollAndOpenReplyInput}
/>
))}
</Col>
{showReply && (
<div className={'ml-6'}>
<div className={'relative ml-7'}>
<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"
/>
<CommentInput

View File

@ -155,7 +155,7 @@ export function FeedComment(props: {
<Row
id={comment.id}
className={clsx(
'relative flex',
'relative',
indent ? 'ml-6' : '',
highlighted ? `-m-1.5 rounded bg-indigo-500/[0.2] p-1.5` : ''
)}