import React from 'react'; import PropTypes from 'prop-types'; import { withTranslation } from 'react-i18next'; import DevidedPagePath from '@commons/models/devided-page-path'; import LinkedPagePath from '@commons/models/linked-page-path'; import PagePathHierarchicalLink from '@commons/components/PagePathHierarchicalLink'; import CopyDropdown from './CopyDropdown'; const RevisionPath = (props) => { // define styles const buttonStyle = { marginLeft: '0.5em', padding: '0 2px', }; const { pageId, isPageInTrash, isPageForbidden, } = props; const dPagePath = new DevidedPagePath(props.pagePath, false, true); const linkedPagePathLatter = new LinkedPagePath(dPagePath.latter); return ( <> { !isPageInTrash && !isPageForbidden && ( ) } ); }; RevisionPath.propTypes = { t: PropTypes.func.isRequired, // i18next pagePath: PropTypes.string.isRequired, pageId: PropTypes.string, isPageForbidden: PropTypes.bool, isPageInTrash: PropTypes.bool, }; RevisionPath.defaultProps = { isPageForbidden: false, isPageInTrash: false, }; export default withTranslation()(RevisionPath);