瀏覽代碼

:bug: 显示协作者数量错

visuddhinanda 2 年之前
父節點
當前提交
444d663c1b
共有 1 個文件被更改,包括 2 次插入2 次删除
  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
   const items: MenuProps["items"] = wordData?.editor
-    .filter((value, index) => index > mainCollaboratorNum)
+    .filter((value, index) => index >= mainCollaboratorNum)
     .map((item, id) => {
     .map((item, id) => {
       return {
       return {
         key: id,
         key: id,
@@ -247,7 +247,7 @@ const CommunityWidget = ({ word }: IWidget) => {
         <Space>
         <Space>
           {"贡献者:"}
           {"贡献者:"}
           {wordData?.editor
           {wordData?.editor
-            .filter((value, index) => index <= mainCollaboratorNum)
+            .filter((value, index) => index < mainCollaboratorNum)
             .map((item, id) => {
             .map((item, id) => {
               return collaboratorRender(item.value.nickName, id, item.score);
               return collaboratorRender(item.value.nickName, id, item.score);
             })}
             })}