This is an automated email from the ASF dual-hosted git repository.

shuai pushed a commit to branch feat/1.4.1/badge-style
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit b927953ff3ffbc759e8a50996efdbe3da0ca7a96
Author: shuai <[email protected]>
AuthorDate: Thu Sep 19 11:17:06 2024 +0800

    fix: change badges detail item key
---
 ui/src/pages/Badges/Detail/index.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/src/pages/Badges/Detail/index.tsx 
b/ui/src/pages/Badges/Detail/index.tsx
index cb85a8b8..c5713e2b 100644
--- a/ui/src/pages/Badges/Detail/index.tsx
+++ b/ui/src/pages/Badges/Detail/index.tsx
@@ -68,7 +68,7 @@ const Index = () => {
         {isSkeletonShow ? (
           <Loader />
         ) : (
-          badges?.list?.map((item) => {
+          badges?.list?.map((item, index) => {
             const linkUrl =
               item.object_type === 'question'
                 ? `/questions/${item.question_id}`
@@ -84,7 +84,7 @@ const Index = () => {
                 sm={12}
                 md={6}
                 lg={3}
-                key={item.author_user_info.id}
+                key={item.object_id || `${item.author_user_info.id}${index}`}
                 className="mb-4">
                 <FormatTime
                   time={item.created_at}

Reply via email to