npm run build

This commit is contained in:
2026-04-23 14:52:13 +02:00
parent c7d5f281c5
commit fc0e6a0a69
2 changed files with 36 additions and 27 deletions

View File

@@ -120,12 +120,20 @@ interface CountryStat {
percentage: number; percentage: number;
} }
interface GeoMapProps { interface GeoMapProps {
countryStats: CountryStat[]; countryStats: CountryStat[];
totalScans: number; totalScans: number;
} }
const GeoMap: React.FC<GeoMapProps> = ({ countryStats, totalScans }) => { interface GeographyFeature {
id: string;
rsmKey: string;
properties: {
name: string;
};
}
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> = {};
let maxCount = 0; let maxCount = 0;
@@ -159,17 +167,17 @@ const GeoMap: React.FC<GeoMapProps> = ({ countryStats, totalScans }) => {
projectionConfig={{ projectionConfig={{
scale: 120, scale: 120,
center: [0, 30], center: [0, 30],
}} }}
style={{ width: '100%', height: '100%' }} style={{ width: '100%', height: '100%' }}
> >
<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;
const fillColor = scanCount > 0 ? colorScale(scanCount) : '#F1F5F9'; const fillColor = scanCount > 0 ? colorScale(scanCount) : '#F1F5F9';
return ( return (
<Geography <Geography

View File

@@ -8,15 +8,16 @@
"noEmit": true, "noEmit": true,
"esModuleInterop": true, "esModuleInterop": true,
"module": "esnext", "module": "esnext",
"moduleResolution": "bundler", "moduleResolution": "bundler",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve", "jsx": "preserve",
"incremental": true, "incremental": true,
"plugins": [ "typeRoots": ["./src/types", "./node_modules/@types"],
{ "plugins": [
"name": "next" {
} "name": "next"
}
], ],
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
@@ -25,4 +26,4 @@
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"] "exclude": ["node_modules"]
} }