website refactor
This commit is contained in:
22
apps/website/ui/LeagueLogo.tsx
Normal file
22
apps/website/ui/LeagueLogo.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
import { Image } from './Image';
|
||||
|
||||
export interface LeagueLogoProps {
|
||||
leagueId: string;
|
||||
alt: string;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export function LeagueLogo({ leagueId, alt, size = 100 }: LeagueLogoProps) {
|
||||
return (
|
||||
<Image
|
||||
src={`/media/leagues/${leagueId}/logo`}
|
||||
alt={alt}
|
||||
width={size}
|
||||
height={size}
|
||||
style={{ objectFit: 'contain' }}
|
||||
fallbackSrc="/default-league-logo.png"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user