npm run build
This commit is contained in:
@@ -125,6 +125,14 @@ interface GeoMapProps {
|
|||||||
totalScans: number;
|
totalScans: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface GeographyFeature {
|
||||||
|
id: string;
|
||||||
|
rsmKey: string;
|
||||||
|
properties: {
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const GeoMap: React.FC<GeoMapProps> = ({ countryStats, totalScans }) => {
|
const GeoMap: React.FC<GeoMapProps> = ({ countryStats, totalScans }) => {
|
||||||
// Build a map of ISO Alpha-3 codes to scan counts
|
// Build a map of ISO Alpha-3 codes to scan counts
|
||||||
const countryData: Record<string, number> = {};
|
const countryData: Record<string, number> = {};
|
||||||
@@ -164,8 +172,8 @@ const GeoMap: React.FC<GeoMapProps> = ({ countryStats, totalScans }) => {
|
|||||||
>
|
>
|
||||||
<ZoomableGroup center={[0, 30]} zoom={1}>
|
<ZoomableGroup center={[0, 30]} zoom={1}>
|
||||||
<Geographies geography={geoUrl}>
|
<Geographies geography={geoUrl}>
|
||||||
{({ geographies }) =>
|
{({ geographies }: { geographies: GeographyFeature[] }) =>
|
||||||
geographies.map((geo) => {
|
geographies.map((geo: GeographyFeature) => {
|
||||||
// geo.id is the numeric ISO code as a string (e.g., "840" for US)
|
// geo.id is the numeric ISO code as a string (e.g., "840" for US)
|
||||||
const geoId = geo.id;
|
const geoId = geo.id;
|
||||||
const scanCount = countryData[geoId] || 0;
|
const scanCount = countryData[geoId] || 0;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
|
"typeRoots": ["./src/types", "./node_modules/@types"],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "next"
|
"name": "next"
|
||||||
|
|||||||
Reference in New Issue
Block a user