Skip to content

Commit

Permalink
Feat. 用户动态升级
Browse files Browse the repository at this point in the history
  • Loading branch information
RavelloH committed Oct 24, 2024
1 parent eae330f commit 285fd46
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/app/user/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ function dynamic(userinfo) {
),
}),
);
userinfo.comment.forEach((comment) => {
dynamicList.push({
time: comment.createdAt,
link: "#",
message: (
<div>
<p style={{ maxWidth: '100%' }}>
<span className='ri-time-fill'></span>{' '}
<span>{formatDateWithTimeZone(comment.createdAt, -8)}</span> &gt;
评论了文稿:{comment.content.slice(0, 30)}...
</p>
<hr className='light' />
</div>
),
});
})
dynamicList.sort((a, b) => new Date(b.time) - new Date(a.time));
let resultList = [];
dynamicList.forEach((item) =>
Expand Down

0 comments on commit 285fd46

Please sign in to comment.