website refactor
This commit is contained in:
20
apps/website/ui/LeagueCover.tsx
Normal file
20
apps/website/ui/LeagueCover.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
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"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user