fix(feed): old account comments could appear at the top of the feed

This commit is contained in:
Tom (plebeius.eth)
2024-10-15 12:11:56 +02:00
parent ea29b6fa03
commit c2aa9cad49
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -80,10 +80,11 @@ const Board = () => {
const filteredComments = useMemo(
() =>
accountComments.filter((comment) => {
const { cid, deleted, postCid, removed, state } = comment || {};
const { cid, deleted, postCid, removed, state, timestamp } = comment || {};
return (
!deleted &&
!removed &&
timestamp > Date.now() - 60 * 60 * 1000 &&
state === 'succeeded' &&
cid &&
(hideThreadsWithoutImages ? getHasThumbnail(getCommentMediaInfo(comment), comment?.link) : true) &&