fix: make world map fill available card height instead of fixed 340px

This commit is contained in:
fuomag9
2026-02-27 02:00:00 +01:00
parent be2416d7b3
commit 7553fe0bb5
2 changed files with 8 additions and 5 deletions
@@ -324,12 +324,14 @@ export default function AnalyticsClient() {
{/* World map + Countries */}
<Grid container spacing={2}>
<Grid size={{ xs: 12, md: 7 }}>
<Card elevation={0} sx={{ border: '1px solid rgba(148,163,184,0.12)', height: '100%' }}>
<CardContent>
<Card elevation={0} sx={{ border: '1px solid rgba(148,163,184,0.12)', height: '100%', display: 'flex', flexDirection: 'column' }}>
<CardContent sx={{ display: 'flex', flexDirection: 'column', flex: 1, minHeight: 0 }}>
<Typography variant="subtitle1" fontWeight={600} sx={{ mb: 1 }}>
Traffic by Country
</Typography>
<WorldMap data={countries} />
<Box sx={{ flex: 1, minHeight: 0 }}>
<WorldMap data={countries} />
</Box>
</CardContent>
</Card>
</Grid>
+3 -2
View File
@@ -229,7 +229,7 @@ export default function WorldMapInner({ data }: { data: CountryStats[] }) {
}
return (
<Box sx={{ position: 'relative' }}>
<Box sx={{ position: 'relative', height: '100%', display: 'flex', flexDirection: 'column' }}>
{/* Override MapLibre popup chrome to match dark theme */}
<style>{`
.wm-popup .maplibregl-popup-content {
@@ -248,7 +248,8 @@ export default function WorldMapInner({ data }: { data: CountryStats[] }) {
borderRadius: 2,
overflow: 'hidden',
border: '1px solid rgba(148,163,184,0.08)',
height: 340,
flex: 1,
minHeight: 280,
}}>
<MapGL
mapStyle={MAP_STYLE}