From cfe8686d94c6ad0df05fe6a240ef25b1840429be Mon Sep 17 00:00:00 2001 From: "Tom (plebeius.eth)" Date: Mon, 12 Aug 2024 13:13:42 +0200 Subject: [PATCH] fix(popular threads box): in each post content, one return would appear as two returns (empty lines) --- src/views/home/popular-threads-box/popular-threads-box.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/home/popular-threads-box/popular-threads-box.tsx b/src/views/home/popular-threads-box/popular-threads-box.tsx index 6e6a58ae..f06e73de 100644 --- a/src/views/home/popular-threads-box/popular-threads-box.tsx +++ b/src/views/home/popular-threads-box/popular-threads-box.tsx @@ -18,9 +18,11 @@ interface PopularThreadProps { } const PopularThreadCard = ({ post, boardTitle, boardShortAddress }: PopularThreadProps) => { - const { cid, content, subplebbitAddress, title } = post || {}; + const { cid, subplebbitAddress, title } = post || {}; const commentMediaInfo = getCommentMediaInfo(post); + let content = post?.content?.replace(/\n\n/g, '\n'); + return (
{boardTitle || boardShortAddress}