|
|
@@ -2,7 +2,7 @@ import React, { FC, useEffect, useState } from 'react';
|
|
|
import { pagePathUtils } from '@growi/core';
|
|
|
|
|
|
import {
|
|
|
- useCreatedAt, useDeleteUsername, useDeletedAt, useHasChildren, useHasDraftOnHackmd, useIsAbleToDeleteCompletely,
|
|
|
+ useCurrentCreatedAt, useDeleteUsername, useDeletedAt, useHasChildren, useHasDraftOnHackmd, useIsAbleToDeleteCompletely,
|
|
|
useIsDeletable, useIsDeleted, useIsNotCreatable, useIsPageExist, useIsTrashPage, useIsUserPage, useLastUpdateUsername,
|
|
|
usePageId, usePageIdOnHackmd, usePageUser, useCurrentPagePath, useRevisionCreatedAt, useRevisionId, useRevisionIdHackmdSynced,
|
|
|
useShareLinkId, useShareLinksNumber, useTemplateTagData, useUpdatedAt, useCreator, useRevisionAuthor, useCurrentUser,
|
|
|
@@ -39,7 +39,10 @@ const ContextExtractorOnce: FC = () => {
|
|
|
const path = decodeURI(mainContent?.getAttribute('data-path') || '');
|
|
|
const pageId = mainContent?.getAttribute('data-page-id') || null;
|
|
|
const revisionCreatedAt = +(mainContent?.getAttribute('data-page-revision-created') || '');
|
|
|
- const createdAt = mainContent?.getAttribute('data-page-created-at');
|
|
|
+
|
|
|
+ const createdAtAttribute = mainContent?.getAttribute('data-page-created-at');
|
|
|
+ const createdAt: Date | null = (createdAtAttribute != null) ? new Date(createdAtAttribute) : null;
|
|
|
+
|
|
|
const updatedAt = mainContent?.getAttribute('data-page-updated-at');
|
|
|
const deletedAt = mainContent?.getAttribute('data-page-deleted-at') || null;
|
|
|
const isUserPage = JSON.parse(mainContent?.getAttribute('data-page-user') || jsonNull);
|
|
|
@@ -76,7 +79,7 @@ const ContextExtractorOnce: FC = () => {
|
|
|
useCurrentProductNavWidth(userUISettings?.currentProductNavWidth);
|
|
|
|
|
|
// Page
|
|
|
- useCreatedAt(createdAt);
|
|
|
+ useCurrentCreatedAt(createdAt);
|
|
|
useDeleteUsername(deleteUsername);
|
|
|
useDeletedAt(deletedAt);
|
|
|
useHasChildren(hasChildren);
|