import { FC } from 'react'; import { TeamOutlined } from '@ant-design/icons'; import { cn } from '@imphnen-frontend-service/utils'; interface TeamBannerPlaceholderProps { banner?: string; teamName: string; className?: string; showPlaceholder?: boolean; } const TeamBannerPlaceholder: FC = ({ banner, teamName, className = '', showPlaceholder = true, }) => { const aspectRatioClass = 'aspect-[3/1]'; // 3:1 aspect ratio if (!banner && !showPlaceholder) { return null; } if (banner) { return (
{`${teamName} { // Fallback to placeholder if image fails to load const target = e.target as HTMLImageElement; target.style.display = 'none'; const placeholder = target.nextElementSibling as HTMLElement; if (placeholder) { placeholder.style.display = 'flex'; } }} /> {/* Fallback placeholder (hidden by default, shown on image error) */}
); } // No banner - show placeholder return (

{teamName}

No Banner

); }; export default TeamBannerPlaceholder;