some more styling to the frontend

This commit is contained in:
jenz
2026-08-24 21:52:29 +02:00
parent 28b4e957ea
commit 09107047b9
17 changed files with 275 additions and 147 deletions
@@ -30,8 +30,8 @@ export default async function CountriesPage() {
</div>
{countries.map((c) => (
<Link
key={c.current_country}
href={`/countries/${encodeURIComponent(c.current_country)}`}
key={c.current_country ?? 'unknown'}
href={`/countries/${c.current_country ? encodeURIComponent(c.current_country) : 'unknown'}`}
className="grid grid-cols-[1fr_auto_auto] gap-6 items-center px-4 py-3 hover:bg-base transition-colors"
>
<div className="flex items-center gap-3 min-w-0">
@@ -39,7 +39,9 @@ export default async function CountriesPage() {
{countryCodeToFlag(c.current_country)}
</span>
<span className="text-ink text-sm truncate">{countryCodeToName(c.current_country)}</span>
<span className="text-ink-faint text-xs mono shrink-0">{c.current_country}</span>
{c.current_country && (
<span className="text-ink-faint text-xs mono shrink-0">{c.current_country}</span>
)}
<span className="text-ink-muted text-xs mono shrink-0">
{c.player_count} player{c.player_count === 1 ? '' : 's'}
</span>