fix: make world map fill available card height instead of fixed 340px
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user