import { __, _n, sprintf } from '@wordpress/i18n'; import type { JSX } from 'react'; import type { LinkDetail } from '../../shared/api/types/links'; import { formatNumber } from '../../shared/lib/numbers'; import { placesPhrase } from '../../shared/text/countedPhrases'; import { Icon } from '../../shared/ui/Icon'; const USES_SHOWN = 3; export function Uses( { link }: { link: LinkDetail } ): JSX.Element { const shownUses = link.uses.slice( 0, USES_SHOWN ); const hiddenCount = link.uses_count - shownUses.length; return (
{ use.before } { use.text } { use.after }
{ use.builder !== null && (