import { __, sprintf } from '@wordpress/i18n'; import type { JSX } from 'react'; import type { LinksQuery } from '../../shared/api/types/links'; import type { Counts } from '../../shared/api/types/status'; import { useLinks } from '../../shared/api/useLinks'; import { formatNumber } from '../../shared/lib/numbers'; import { navigate } from '../../shared/lib/router'; import { Button } from '../../shared/ui/Button'; import { Empty } from '../../shared/ui/Empty'; import { FixFirstItem } from './FixFirstItem'; import { problemCount } from './ringGeometry'; const MOST_USED_BROKEN_LINKS: LinksQuery = { status: 'broken', orderby: 'uses', order: 'desc', per_page: 5, }; export function FixFirst( { counts }: { counts: Counts } ): JSX.Element { const linksQuery = useLinks( MOST_USED_BROKEN_LINKS ); const firstLinks = linksQuery.data?.items ?? []; return (