import { useCallback } from 'react'; import { useRouter } from 'next/router'; import DataTable from 'components/metrics/DataTable'; import useLocale from 'hooks/useLocale'; import useCountryNames from 'hooks/useCountryNames'; import useMessages from 'hooks/useMessages'; import classNames from 'classnames'; import styles from './RealtimeCountries.module.css'; export function RealtimeCountries({ data }) { const { formatMessage, labels } = useMessages(); const { locale } = useLocale(); const countryNames = useCountryNames(locale); const { basePath } = useRouter(); const renderCountryName = useCallback( ({ x: code }) => ( {code} {countryNames[code]} ), [countryNames, locale, basePath], ); return ( ); } export default RealtimeCountries;