Răsfoiți Sursa

:bug: 显示协作者数量错

visuddhinanda 2 ani în urmă
părinte
comite
444d663c1b
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      dashboard/src/components/dict/Community.tsx

+ 2 - 2
dashboard/src/components/dict/Community.tsx

@@ -148,7 +148,7 @@ const CommunityWidget = ({ word }: IWidget) => {
     );
   };
   const items: MenuProps["items"] = wordData?.editor
-    .filter((value, index) => index > mainCollaboratorNum)
+    .filter((value, index) => index >= mainCollaboratorNum)
     .map((item, id) => {
       return {
         key: id,
@@ -247,7 +247,7 @@ const CommunityWidget = ({ word }: IWidget) => {
         <Space>
           {"贡献者:"}
           {wordData?.editor
-            .filter((value, index) => index <= mainCollaboratorNum)
+            .filter((value, index) => index < mainCollaboratorNum)
             .map((item, id) => {
               return collaboratorRender(item.value.nickName, id, item.score);
             })}