Преглед изворни кода

use useCurrentCreatedAt in GrowiSubNavigation

kaori пре 4 година
родитељ
комит
5e7cfe1d5b
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      packages/app/src/components/Navbar/GrowiSubNavigation.jsx

+ 4 - 1
packages/app/src/components/Navbar/GrowiSubNavigation.jsx

@@ -11,6 +11,7 @@ import { withUnstatedContainers } from '../UnstatedUtils';
 import AppContainer from '~/client/services/AppContainer';
 import NavigationContainer from '~/client/services/NavigationContainer';
 import PageContainer from '~/client/services/PageContainer';
+import { useCurrentCreatedAt } from '~/stores/context';
 
 import CopyDropdown from '../Page/CopyDropdown';
 import TagLabels from '../Page/TagLabels';
@@ -72,9 +73,11 @@ const GrowiSubNavigation = (props) => {
   } = props;
   const { isDrawerMode, editorMode, isDeviceSmallerThanMd } = navigationContainer.state;
   const {
-    pageId, path, createdAt, creator, updatedAt, revisionAuthor, isPageExist,
+    pageId, path, creator, updatedAt, revisionAuthor, isPageExist,
   } = pageContainer.state;
 
+  const { data: createdAt } = useCurrentCreatedAt();
+
   const { isGuestUser } = appContainer;
   const isEditorMode = editorMode !== 'view';
   // Tags cannot be edited while the new page and editorMode is view