yohei0125 3 лет назад
Родитель
Сommit
4cc0d98080
1 измененных файлов с 4 добавлено и 7 удалено
  1. 4 7
      packages/app/src/components/Page/DisplaySwitcher.tsx

+ 4 - 7
packages/app/src/components/Page/DisplaySwitcher.tsx

@@ -7,7 +7,7 @@ import { TabContent, TabPane } from 'reactstrap';
 
 import { smoothScrollIntoView } from '~/client/util/smooth-scroll';
 import {
-  useCurrentPagePath, useIsSharedUser, useIsEditable, useCurrentPageId, useIsUserPage, usePageUser, useShareLinkId, useIsEmptyPageInNotFoundContext,
+  useCurrentPagePath, useIsSharedUser, useIsEditable, useCurrentPageId, useIsUserPage, usePageUser, useShareLinkId,
 } from '~/stores/context';
 import { useDescendantsPageListModal } from '~/stores/modal';
 import { useSWRxCurrentPage } from '~/stores/page';
@@ -36,7 +36,6 @@ const DisplaySwitcher = (): JSX.Element => {
   // get element for smoothScroll
   const getCommentListDom = useMemo(() => { return document.getElementById('page-comments-list') }, []);
 
-  const { data: isEmptyPageInNotFoundContext } = useIsEmptyPageInNotFoundContext();
   const { data: currentPageId } = useCurrentPageId();
   const { data: currentPagePath } = useCurrentPagePath();
   const { data: isSharedUser } = useIsSharedUser();
@@ -97,11 +96,9 @@ const DisplaySwitcher = (): JSX.Element => {
                   ) }
 
                   <div className="d-none d-lg-block">
-                    {!isEmptyPageInNotFoundContext && (
-                      <div id="revision-toc" className="revision-toc">
-                        <TableOfContents />
-                      </div>
-                    )}
+                    <div id="revision-toc" className="revision-toc">
+                      <TableOfContents />
+                    </div>
                     <ContentLinkButtons />
                   </div>