Fix sort order on comments I broke

This commit is contained in:
Marshall Polaris 2022-08-27 15:18:18 -07:00
parent adf1c01b9d
commit 6f6a70fa51

View File

@ -65,7 +65,10 @@ export function ContractCommentsActivity(props: {
const betsByUserId = groupBy(bets, (bet) => bet.userId) const betsByUserId = groupBy(bets, (bet) => bet.userId)
const commentsByUserId = groupBy(comments, (c) => c.userId) const commentsByUserId = groupBy(comments, (c) => c.userId)
const commentsByParentId = groupBy(comments, (c) => c.replyToCommentId ?? '_') const commentsByParentId = groupBy(comments, (c) => c.replyToCommentId ?? '_')
const topLevelComments = commentsByParentId['_'] ?? [] const topLevelComments = sortBy(
commentsByParentId['_'] ?? [],
(c) => -c.createdTime
)
return ( return (
<div> <div>