import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import { isTrashPage } from '@commons/util/path-utils'; import { createSubscribedElement } from '../UnstatedUtils'; import AppContainer from '../../services/AppContainer'; import RevisionPath from '../Page/RevisionPath'; import PageContainer from '../../services/PageContainer'; import TagLabels from '../Page/TagLabels'; import LikeButton from '../LikeButton'; import BookmarkButton from '../BookmarkButton'; import PageCreator from './PageCreator'; import RevisionAuthor from './RevisionAuthor'; const GrowiSubNavigation = (props) => { const isPageForbidden = document.querySelector('#grw-subnav').getAttribute('data-is-forbidden-page') === 'true'; const { appContainer, pageContainer } = props; const { pageId, path, createdAt, creator, updatedAt, revisionAuthor, isHeaderSticky, isSubnavCompact, } = pageContainer.state; const isPageNotFound = pageId == null; const isPageInTrash = isTrashPage(path); // Display only the RevisionPath if (isPageNotFound || isPageForbidden || isPageInTrash) { return (