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
@@ -1,7 +1,7 @@
'use client';
import Link from 'next/link';
import { formatMinutes } from '@/lib/steam';
import { formatMinutes, countryCodeToFlag } from '@/lib/steam';
interface Segment {
startMin: number;
@@ -12,6 +12,7 @@ interface TimelinePlayer {
steamid: string;
name: string;
avatarUrl: string;
country?: string | null;
totalMinutes: number;
segments: Segment[];
}
@@ -53,6 +54,11 @@ export default function PlayerTimelineChart({
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={p.avatarUrl} alt="" className="w-6 h-6 rounded-full object-cover ring-1 ring-base-border shrink-0" />
{p.country !== undefined && (
<span className="text-xs shrink-0" aria-hidden>
{countryCodeToFlag(p.country)}
</span>
)}
<span className="text-sm text-ink truncate">{p.name}</span>
</Link>