yuken 3 лет назад
Родитель
Сommit
7e7ed61dfb
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/components/NotFoundPage.tsx

+ 2 - 2
packages/app/src/components/NotFoundPage.tsx

@@ -3,7 +3,7 @@ import React, { useMemo, useEffect } from 'react';
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 import urljoin from 'url-join';
 import urljoin from 'url-join';
 
 
-import { useCurrentPagePath, useIsEmptyPage, useNotFoundTargetPathOrId } from '~/stores/context';
+import { useIsEmptyPage, useNotFoundTargetPathOrId, useCurrentPathname } from '~/stores/context';
 
 
 import CustomNavAndContents from './CustomNavigation/CustomNavAndContents';
 import CustomNavAndContents from './CustomNavigation/CustomNavAndContents';
 import { DescendantsPageListForCurrentPath } from './DescendantsPageList';
 import { DescendantsPageListForCurrentPath } from './DescendantsPageList';
@@ -22,7 +22,7 @@ const replaceURLHistory = (path: string) => {
 const NotFoundPage = (): JSX.Element => {
 const NotFoundPage = (): JSX.Element => {
   const { t } = useTranslation();
   const { t } = useTranslation();
   const { data: isEmptyPage } = useIsEmptyPage();
   const { data: isEmptyPage } = useIsEmptyPage();
-  const { data: path } = useCurrentPagePath();
+  const { data: path } = useCurrentPathname();
   const { data: notFoundTargetPathOrId } = useNotFoundTargetPathOrId();
   const { data: notFoundTargetPathOrId } = useNotFoundTargetPathOrId();
 
 
   // replace url in address bar with path when accessing empty page by permalink
   // replace url in address bar with path when accessing empty page by permalink