Просмотр исходного кода

Rename method

https://youtrack.weseek.co.jp/issue/GW-7849
- Rename method getChildCount to childCount
Mudana-Grune 3 лет назад
Родитель
Сommit
bacd1716de
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/components/Bookmarks/BookmarkFolderItem.tsx

+ 2 - 2
packages/app/src/components/Bookmarks/BookmarkFolderItem.tsx

@@ -38,7 +38,7 @@ const BookmarkFolderItem: FC<BookmarkFolderItemProps> = (props: BookmarkFolderIt
   const [isCreateAction, setIsCreateAction] = useState<boolean>(false);
   const [isDeleteFolderModalShown, setIsDeleteFolderModalShown] = useState<boolean>(false);
 
-  const getChildCount = useMemo((): number => {
+  const childCount = useMemo((): number => {
     if (currentChildren != null && currentChildren.length > children.length) {
       return currentChildren.length;
     }
@@ -188,7 +188,7 @@ const BookmarkFolderItem: FC<BookmarkFolderItemProps> = (props: BookmarkFolderIt
             </div>
             {hasChildren() && (
               <div className="grw-foldertree-count-wrapper">
-                <CountBadge count={ getChildCount } />
+                <CountBadge count={ childCount } />
               </div>
             )}
           </>