Explorar el Código

fix lint errors

Yuki Takei hace 3 años
padre
commit
60e095f08f

+ 8 - 8
packages/app/src/components/Navbar/GrowiContextualSubNavigation.tsx

@@ -2,7 +2,6 @@ import React, { useState, useEffect, useCallback } from 'react';
 
 
 import { isPopulated } from '@growi/core';
-import { IResTagsUpdateApiv1 } from '~/interfaces/tag';
 import { useTranslation } from 'next-i18next';
 import dynamic from 'next/dynamic';
 import { DropdownItem } from 'reactstrap';
@@ -13,9 +12,8 @@ import { apiPost } from '~/client/util/apiv1-client';
 import {
   IPageToRenameWithMeta, IPageWithMeta, IPageInfoForEntity, IPageHasId,
 } from '~/interfaces/page';
-import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
-import { IUser } from '~/interfaces/user';
 import { IResTagsUpdateApiv1 } from '~/interfaces/tag';
+import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
 import {
   useCurrentPageId,
   useCurrentPathname,
@@ -244,7 +242,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
       toastError(err, 'fail to update tags');
     }
 
-  }, [mutateSWRTagsInfo, mutatePageTagsForEditors, mutateCurrentPage, pageId, revisionId]);
+  }, [currentPage, mutateCurrentPage, mutateSWRTagsInfo, mutatePageTagsForEditors]);
 
   const tagsUpdatedHandlerForEditMode = useCallback((newTags: string[]): void => {
     // It will not be reflected in the DB until the page is refreshed
@@ -356,11 +354,13 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
       </>
     );
   }, [
-    pageId, revisionId, editorMode, mutateEditorMode, isCompactMode,
-    isLinkSharingDisabled, isGuestUser, isSharedUser, currentUser,
-    isViewMode, isAbleToShowPageEditorModeManager, isAbleToShowPageManagement,
+    currentPage, currentUser, pageId, revisionId, shareLinkId, path, editorMode,
+    isCompactMode, isViewMode, isSharedUser, isAbleToShowPageManagement, isAbleToShowPageEditorModeManager,
+    isLinkSharingDisabled, isGuestUser, isPageTemplateModalShown,
     duplicateItemClickedHandler, renameItemClickedHandler, deleteItemClickedHandler,
-    templateMenuItemClickHandler, isPageTemplateModalShown,
+    PageEditorModeManager, SubNavButtons,
+    mutateEditorMode,
+    templateMenuItemClickHandler,
   ]);
 
   if (currentPathname == null) {