import nodePath from 'path'; import { useTranslation } from 'next-i18next'; import { UncontrolledTooltip } from 'reactstrap'; import type { IPageForItem } from '~/interfaces/page'; import { shouldRecoverPagePaths } from '~/utils/page-operation'; import styles from './SimpleItemContent.module.scss'; const moduleClass = styles['simple-item-content'] ?? ''; export const SimpleItemContent = ({ page }: { page: IPageForItem }): JSX.Element => { const { t } = useTranslation(); const pageName = nodePath.basename(page.path ?? '') || '/'; const shouldShowAttentionIcon = page.processData != null ? shouldRecoverPagePaths(page.processData) : false; return (
{shouldShowAttentionIcon && ( <> warning {t('tooltip.operation.attention.rename')} )} {page != null && page.path != null && page._id != null && (
{pageName} { page.wip && ( WIP )}
)}
); };