changes are happening to me

This commit is contained in:
ingawei 2022-10-12 01:25:31 -07:00
parent 1953539d80
commit 020ddc052a
2 changed files with 32 additions and 38 deletions

View File

@ -173,14 +173,27 @@ const CommentsTabContent = memo(function CommentsTabContent(props: {
/>
)}
{topLevelComments.map((parent) => {
if (parent.answerOutcome != undefined) {
if (parent.answerOutcome === undefined) {
return (
<FeedCommentThread
key={parent.id}
contract={contract}
parentComment={parent}
threadComments={sortBy(
commentsByParent[parent.id] ?? [],
(c) => c.createdTime
)}
tips={tips}
/>
)
}
const answer = contract.answers.find(
(answer) => answer.id === parent.answerOutcome
)
if (answer === undefined) {
console.error('Could not find answer that matches ID')
return <></>
} else {
}
return (
<>
<Row className="gap-2">
@ -205,21 +218,6 @@ const CommentsTabContent = memo(function CommentsTabContent(props: {
</Row>
</>
)
}
} else {
return (
<FeedCommentThread
key={parent.id}
contract={contract}
parentComment={parent}
threadComments={sortBy(
commentsByParent[parent.id] ?? [],
(c) => c.createdTime
)}
tips={tips}
/>
)
}
})}
</>
)

View File

@ -78,10 +78,6 @@ export function FeedCommentThread(props: {
))}
{replyTo && (
<Col className="-pb-2 relative ml-6">
<span
className="absolute -left-1 -ml-[1px] mt-[0.8rem] h-2 w-0.5 rotate-90 bg-gray-200"
aria-hidden="true"
/>
<ContractCommentInput
contract={contract}
parentCommentId={parentComment.id}