

import { Image } from './Image';

export interface LeagueCoverProps {
  leagueId: string;
  alt: string;
  height?: string;
}

export function LeagueCover({ leagueId, alt, height = '12rem' }: LeagueCoverProps) {
  return (
    <Image
      src={`/media/leagues/${leagueId}/cover`}
      alt={alt}
      style={{ width: '100%', height, objectFit: 'cover' }}
      fallbackSrc="/default-league-cover.png"
    />
  );
}
