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

+ 4 - 1
packages/app/src/components/Page.tsx

@@ -16,7 +16,7 @@ import { useSaveOrUpdate } from '~/client/services/page-operation';
 import { toastSuccess, toastError } from '~/client/util/apiNotification';
 import { OptionsToSave } from '~/interfaces/page-operation';
 import {
-  useIsGuestUser, useShareLinkId,
+  useIsGuestUser, useShareLinkId, useCurrentPathname,
 } from '~/stores/context';
 import { useEditingMarkdown } from '~/stores/editor';
 import { useDrawioModal, useHandsontableModal } from '~/stores/modal';
@@ -64,6 +64,9 @@ export const Page: FC<Props> = (props: Props) => {
     tocRef.current = toc;
   }, []);
 
+  const { data: pathname } = useCurrentPathname();
+  const isSharedPage = pagePathUtils.isSharedPage(pathname ?? '');
+
   const { data: shareLinkId } = useShareLinkId();
   const { mutate: mutateCurrentPage } = useSWRxCurrentPage();
   const { mutate: mutateEditingMarkdown } = useEditingMarkdown();