fix: show full city name with postal code and country in top villes
Restore full Cesium+ city field (including postal code), restructure the city card so name wraps on two lines with country badge + tx count + volume all readable without truncation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,24 +116,26 @@ export function StatsPanel({ stats, loading, periodDays, source }: StatsPanelPro
|
|||||||
{stats.topCities.map((city, i) => (
|
{stats.topCities.map((city, i) => (
|
||||||
<div
|
<div
|
||||||
key={city.name}
|
key={city.name}
|
||||||
className="bg-[#0f1016] border border-[#2e2f3a] rounded-lg px-3 py-2.5 flex items-center gap-3"
|
className="bg-[#0f1016] border border-[#2e2f3a] rounded-lg px-3 py-2.5 flex gap-2.5"
|
||||||
>
|
>
|
||||||
<span className="text-base">{MEDALS[i]}</span>
|
<span className="text-base shrink-0 mt-0.5">{MEDALS[i]}</span>
|
||||||
<div className="flex-1 min-w-0">
|
<div className="flex-1 min-w-0">
|
||||||
<p className="text-white text-sm font-medium truncate flex items-center gap-1.5">
|
<p className="text-white text-xs font-medium leading-snug">{city.name}</p>
|
||||||
{city.countryCode && (
|
<div className="flex items-center justify-between mt-1">
|
||||||
<span className="shrink-0 text-[10px] font-bold bg-[#1e1f2a] text-[#6b7280] rounded px-1 py-0.5 leading-none">
|
<span className="flex items-center gap-1.5 text-[#6b7280] text-xs">
|
||||||
{city.countryCode}
|
{city.countryCode && (
|
||||||
</span>
|
<span className="text-[10px] font-bold bg-[#1e1f2a] text-[#6b7280] rounded px-1 py-0.5 leading-none">
|
||||||
)}
|
{city.countryCode}
|
||||||
{city.name}
|
</span>
|
||||||
</p>
|
)}
|
||||||
<p className="text-[#6b7280] text-xs">{city.count} tx</p>
|
{city.count} tx
|
||||||
|
</span>
|
||||||
|
<span className="text-[#d4a843] text-xs font-mono flex items-center gap-1">
|
||||||
|
{city.volume.toLocaleString('fr-FR', { maximumFractionDigits: 0 })} Ğ1
|
||||||
|
{delta(city.volume, prevCityVolume, city.name)}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-[#d4a843] text-sm font-mono shrink-0 flex items-center gap-1">
|
|
||||||
{city.volume.toLocaleString('fr-FR', { maximumFractionDigits: 0 })} Ğ1
|
|
||||||
{delta(city.volume, prevCityVolume, city.name)}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export async function resolveGeoByKeys(
|
|||||||
if (!geo) continue;
|
if (!geo) continue;
|
||||||
result.set(hit._id, {
|
result.set(hit._id, {
|
||||||
name: src.title ?? '',
|
name: src.title ?? '',
|
||||||
city: cleanCityName(src.city ?? 'Inconnue'),
|
city: src.city ?? 'Inconnue',
|
||||||
countryCode: latLngToCountryCode(geo.lat, geo.lng),
|
countryCode: latLngToCountryCode(geo.lat, geo.lng),
|
||||||
lat: geo.lat,
|
lat: geo.lat,
|
||||||
lng: geo.lng,
|
lng: geo.lng,
|
||||||
|
|||||||
Reference in New Issue
Block a user