// components/MatchesSection.js import React from 'react'; import { Box, Text } from 'ink'; function translateHomeAway(homeAway) { if (homeAway === 'Home') return 'domicile'; if (homeAway === 'Away') return 'extérieur'; return homeAway; } export function MatchesSection({ matches, teamColor, teamName, width }) { return ( Matches à venir de {teamName} : {!matches && Chargement des matchs...} {matches && matches.length === 0 && Aucun match trouvé.} {matches && matches.slice(0, 2).map((m, i) => ( {m.date} {m.time} - {teamName} vs {m.opponent} ({translateHomeAway(m.homeAway)}) ))} ); }