댓글 정렬과 뷰어 레일 정리

This commit is contained in:
2026-04-07 14:00:29 +09:00
parent 9f143d4a89
commit 09b9036bbe
9 changed files with 76 additions and 105 deletions

View File

@@ -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
}