From cbaa00989ab4aa31e7eff7660d30e36139c84dd8 Mon Sep 17 00:00:00 2001 From: nyne Date: Sun, 18 May 2025 11:07:47 +0800 Subject: [PATCH] Enhance comment tile with user profile navigation --- frontend/src/pages/resource_details_page.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/resource_details_page.tsx b/frontend/src/pages/resource_details_page.tsx index b9b27dd..78e1d9c 100644 --- a/frontend/src/pages/resource_details_page.tsx +++ b/frontend/src/pages/resource_details_page.tsx @@ -590,15 +590,21 @@ function CommentsList({resourceId, page, maxPageCallback}: { } function CommentTile({comment}: { comment: Comment }) { + const navigate = useNavigate(); return
-
+
navigate(`/user/${comment.user.username}`)}>
{"avatar"}/
-
{comment.user.username}
+
navigate(`/user/${comment.user.username}`)} + > + {comment.user.username} +
{new Date(comment.created_at).toLocaleString()}