From 285fd4658ded31e4c44308a3ff7de782d537d91c Mon Sep 17 00:00:00 2001 From: RavelloH Date: Thu, 24 Oct 2024 20:46:19 +0800 Subject: [PATCH] =?UTF-8?q?Feat.=20=E7=94=A8=E6=88=B7=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/user/page.jsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/app/user/page.jsx b/src/app/user/page.jsx index 914e8df..e4a67a4 100644 --- a/src/app/user/page.jsx +++ b/src/app/user/page.jsx @@ -56,6 +56,22 @@ function dynamic(userinfo) { ), }), ); + userinfo.comment.forEach((comment) => { + dynamicList.push({ + time: comment.createdAt, + link: "#", + message: ( +
+

+ {' '} + {formatDateWithTimeZone(comment.createdAt, -8)} > + 评论了文稿:{comment.content.slice(0, 30)}... +

+
+
+ ), + }); + }) dynamicList.sort((a, b) => new Date(b.time) - new Date(a.time)); let resultList = []; dynamicList.forEach((item) =>