import React from 'react'; import { pagePathUtils } from '@growi/core/dist/utils'; import { useTranslation } from 'next-i18next'; const { convertToNewAffiliationPath } = pagePathUtils; type DuplicatedPathsTableProps = { existingPaths: string[], fromPath: string, toPath: string } const DuplicatedPathsTable: React.FC = (props: DuplicatedPathsTableProps) => { const { t } = useTranslation(); const { fromPath, toPath, existingPaths, } = props; return ( {existingPaths.map((existPath) => { const convertedPath = convertToNewAffiliationPath(toPath, fromPath, existPath); return ( ); })}
{t('original_path')} {t('duplicated_path')}
{convertedPath} {existPath}
); }; export default DuplicatedPathsTable;