From 608aa632d4c6ac19b4065b18e2215b07ff5e9984 Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Mon, 8 Apr 2024 16:08:58 +0200 Subject: [PATCH] fix(feed): show last 5 replies of thread in feed, not first 5 replies --- src/components/post/post.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/post/post.tsx b/src/components/post/post.tsx index 22fe5da4..3037f775 100644 --- a/src/components/post/post.tsx +++ b/src/components/post/post.tsx @@ -150,7 +150,7 @@ const PostDesktop = ({ post, roles, showAllReplies }: PostProps) => { )} {!(pinned && !isInPostPage) && replies && - replies.slice(0, showAllReplies ? replies.length : 5).map((reply, index) => ( + (showAllReplies ? replies : replies.slice(-5)).map((reply, index) => (
@@ -344,7 +344,7 @@ const PostMobile = ({ post, roles, showAllReplies }: PostProps) => { {!(pinned && !isInPostPage) && replies && - replies.slice(0, showAllReplies ? replies.length : 5).map((reply, index) => ( + (showAllReplies ? replies : replies.slice(-5)).map((reply, index) => (