mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(feed): show last 5 replies of thread in feed, not first 5 replies
This commit is contained in:
@@ -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) => (
|
||||
<div key={reply.cid} className={styles.replyContainer}>
|
||||
<ReplyDesktop index={index} reply={reply} roles={roles} />
|
||||
</div>
|
||||
@@ -344,7 +344,7 @@ const PostMobile = ({ post, roles, showAllReplies }: PostProps) => {
|
||||
</div>
|
||||
{!(pinned && !isInPostPage) &&
|
||||
replies &&
|
||||
replies.slice(0, showAllReplies ? replies.length : 5).map((reply, index) => (
|
||||
(showAllReplies ? replies : replies.slice(-5)).map((reply, index) => (
|
||||
<div key={reply.cid} className={styles.replyContainer}>
|
||||
<ReplyMobile index={index} reply={reply} roles={roles} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user