Skip to main content
The ten highest GDP per capita countries
United States 331,883,986 Indonesia 264,935,824 Russia 141,944,641 Mexico 127,318,112 Brazil 210,301,591 Nigeria 208,679,114 India 1,311,559,204 China 1,389,618,778
import * as React from "react";
import type { CountryContext } from "react-svg-worldmap";
import WorldMap from "react-svg-worldmap";
import { populationData } from "../data/CountryData";

const getHref = ({ countryName }: CountryContext) => ({
href: `https://en.wikipedia.org/wiki/${encodeURIComponent(countryName)}`,
target: "_blank",
});

export default function App(): JSX.Element {
return (
<WorldMap
title="The ten highest GDP per capita countries"
data={populationData}
hrefFunction={getHref}
/>
);
}