Skip to content

Commit 8e58135

Browse files
committed
Update GeoMap.tsx
1 parent 95307a4 commit 8e58135

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

frontend/src/components/GeoMap.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Globe } from "lucide-react";
33
import { Stats } from "@/hooks/useWebSocket";
44
import { ComposableMap, Geographies, Geography, ZoomableGroup } from "react-simple-maps";
55
import { Tooltip as ReactTooltip } from "react-tooltip";
6-
import { useState } from "react";
76

87
interface GeoMapProps {
98
stats: Stats | null;
@@ -55,7 +54,6 @@ const countryCodeMap: Record<string, string> = {
5554
};
5655

5756
export function GeoMap({ stats }: GeoMapProps) {
58-
const [hoveredCountry, setHoveredCountry] = useState<string | null>(null);
5957
const hasCountryData = stats && stats.topCountries && stats.topCountries.length > 0;
6058

6159
// Create a map of country names/codes to request counts
@@ -101,7 +99,6 @@ export function GeoMap({ stats }: GeoMapProps) {
10199
</CardDescription>
102100
</CardHeader>
103101
<CardContent>
104-
{/* Use Tailwind classes for the container */}
105102
<div className="w-full h-[400px]">
106103
{!stats ? (
107104
<div className="h-full flex items-center justify-center text-muted-foreground">
@@ -124,7 +121,6 @@ export function GeoMap({ stats }: GeoMapProps) {
124121
scale: 140,
125122
center: [0, 20]
126123
}}
127-
// Add style to make the map responsive
128124
style={{ width: '100%', height: '100%' }}
129125
>
130126
<ZoomableGroup zoom={1} minZoom={0.5} maxZoom={8}>
@@ -143,8 +139,6 @@ export function GeoMap({ stats }: GeoMapProps) {
143139
<Geography
144140
key={geo.rsmKey}
145141
geography={geo}
146-
onMouseEnter={() => setHoveredCountry(geo.rsmKey)}
147-
onMouseLeave={() => setHoveredCountry(null)}
148142
data-tooltip-id="country-tooltip"
149143
data-tooltip-content={`${geoName}: ${data.count.toLocaleString()} requests`}
150144
style={{

0 commit comments

Comments
 (0)