sorted comments by timestamp

This commit is contained in:
plebbitor
2023-03-06 13:33:46 +01:00
parent 356b0739fd
commit 01e06258d9
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -184,10 +184,12 @@ const Thread = ({ setBodyStyle }) => {
}
return [comment];
}).flat();
return renderedComments;
const sortedComments = renderedComments.sort((a, b) => a.timestamp - b.timestamp);
return sortedComments;
}
return (
<Container>