댓글 정렬과 뷰어 레일 정리
This commit is contained in:
@@ -2740,6 +2740,11 @@ async function listTierListComments(tierListId) {
|
||||
}
|
||||
roots.push(comment)
|
||||
})
|
||||
roots.sort((a, b) => {
|
||||
const timeDiff = Number(b.createdAt || 0) - Number(a.createdAt || 0)
|
||||
if (timeDiff !== 0) return timeDiff
|
||||
return String(b.id || '').localeCompare(String(a.id || ''))
|
||||
})
|
||||
return roots
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user