|
@@ -1,8 +1,11 @@
|
|
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
|
|
|
|
|
|
-import {
|
|
|
|
|
- isPopulated, IUser, pagePathUtils, IPagePopulatedToShowRevision,
|
|
|
|
|
|
|
+import { isPopulated } from '@growi/core';
|
|
|
|
|
+import type {
|
|
|
|
|
+ IUser, IPagePopulatedToShowRevision,
|
|
|
|
|
+ IPageToRenameWithMeta, IPageWithMeta, IPageInfoForEntity,
|
|
|
} from '@growi/core';
|
|
} from '@growi/core';
|
|
|
|
|
+import { pagePathUtils } from '@growi/core/dist/utils';
|
|
|
import { useTranslation } from 'next-i18next';
|
|
import { useTranslation } from 'next-i18next';
|
|
|
import dynamic from 'next/dynamic';
|
|
import dynamic from 'next/dynamic';
|
|
|
import { useRouter } from 'next/router';
|
|
import { useRouter } from 'next/router';
|
|
@@ -11,9 +14,6 @@ import { DropdownItem } from 'reactstrap';
|
|
|
import { exportAsMarkdown, updateContentWidth, useUpdateStateAfterSave } from '~/client/services/page-operation';
|
|
import { exportAsMarkdown, updateContentWidth, useUpdateStateAfterSave } from '~/client/services/page-operation';
|
|
|
import { apiPost } from '~/client/util/apiv1-client';
|
|
import { apiPost } from '~/client/util/apiv1-client';
|
|
|
import { toastSuccess, toastError } from '~/client/util/toastr';
|
|
import { toastSuccess, toastError } from '~/client/util/toastr';
|
|
|
-import {
|
|
|
|
|
- IPageToRenameWithMeta, IPageWithMeta, IPageInfoForEntity,
|
|
|
|
|
-} from '~/interfaces/page';
|
|
|
|
|
import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
import { OnDuplicatedFunction, OnRenamedFunction, OnDeletedFunction } from '~/interfaces/ui';
|
|
|
import {
|
|
import {
|
|
|
useCurrentPathname,
|
|
useCurrentPathname,
|
|
@@ -47,7 +47,6 @@ import type { SubNavButtonsProps } from './SubNavButtons';
|
|
|
import AuthorInfoStyles from './AuthorInfo.module.scss';
|
|
import AuthorInfoStyles from './AuthorInfo.module.scss';
|
|
|
import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
|
|
import PageEditorModeManagerStyles from './PageEditorModeManager.module.scss';
|
|
|
|
|
|
|
|
-const { isUsersHomePage } = pagePathUtils;
|
|
|
|
|
|
|
|
|
|
const AuthorInfoSkeleton = () => <Skeleton additionalClass={`${AuthorInfoStyles['grw-author-info-skeleton']} py-1`} />;
|
|
const AuthorInfoSkeleton = () => <Skeleton additionalClass={`${AuthorInfoStyles['grw-author-info-skeleton']} py-1`} />;
|
|
|
|
|
|
|
@@ -399,7 +398,7 @@ const GrowiContextualSubNavigation = (props: GrowiContextualSubNavigationProps):
|
|
|
/>
|
|
/>
|
|
|
)}
|
|
)}
|
|
|
</div>
|
|
</div>
|
|
|
- {(isAbleToShowPageAuthors && !isCompactMode && !isUsersHomePage(path ?? '')) && (
|
|
|
|
|
|
|
+ {(isAbleToShowPageAuthors && !isCompactMode && !pagePathUtils.isUsersHomePage(path ?? '')) && (
|
|
|
<ul className={`${AuthorInfoStyles['grw-author-info']} text-nowrap border-left d-none d-lg-block d-edit-none py-2 pl-4 mb-0 ml-3`}>
|
|
<ul className={`${AuthorInfoStyles['grw-author-info']} text-nowrap border-left d-none d-lg-block d-edit-none py-2 pl-4 mb-0 ml-3`}>
|
|
|
<li className="pb-1">
|
|
<li className="pb-1">
|
|
|
{currentPage != null
|
|
{currentPage != null
|