'use client'; import { DriverDTO } from '@/application/mappers/EntityMappers'; import Card from '../ui/Card'; import Button from '../ui/Button'; interface DriverProfileProps { driver: DriverDTO; } export default function DriverProfile({ driver }: DriverProfileProps) { const formattedDate = new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric' }).format(new Date(driver.joinedAt)); return (

{driver.name}

iRacing ID: {driver.iracingId}

{getCountryFlag(driver.country)}
{driver.bio && (

Bio

{driver.bio}

)}
Member since {formattedDate}

Profile editing coming soon

); } function getCountryFlag(countryCode: string): string { const code = countryCode.toUpperCase(); if (code.length === 2) { const codePoints = [...code].map(char => 127397 + char.charCodeAt(0) ); return String.fromCodePoint(...codePoints); } return '🏁'; }