import MetricsTable from './MetricsTable'; import { percentFilter } from 'lib/filters'; import { useIntl, defineMessages } from 'react-intl'; import FilterLink from 'components/common/FilterLink'; import useCountryNames from 'hooks/useCountryNames'; import useLocale from 'hooks/useLocale'; const messages = defineMessages({ unknown: { id: 'label.unknown', defaultMessage: 'Unknown' }, countries: { id: 'metrics.countries', defaultMessage: 'Countries' }, visitors: { id: 'metrics.visitors', defaultMessage: 'Visitors' }, }); export default function CountriesTable({ websiteId, onDataLoad, ...props }) { const { locale } = useLocale(); const countryNames = useCountryNames(locale); const { formatMessage } = useIntl(); function renderLink({ x: code }) { return (