website refactor

This commit is contained in:
2026-01-15 17:12:24 +01:00
parent c3b308e960
commit f035cfe7ce
468 changed files with 24378 additions and 17324 deletions

View File

@@ -0,0 +1,31 @@
/**
* TrackImage
*
* Pure UI component for displaying track images.
* Renders an optimized image with fallback on error.
*/
import React from 'react';
import { Image } from './Image';
export interface TrackImageProps {
trackId: string;
alt: string;
className?: string;
}
export function TrackImage({ trackId, alt, className = '' }: TrackImageProps) {
return (
<Image
src={`/media/tracks/${trackId}/image`}
alt={alt}
width={800}
height={256}
className={`w-full h-64 object-cover ${className}`}
onError={(e) => {
// Fallback to default track image
(e.target as HTMLImageElement).src = '/default-track-image.png';
}}
/>
);
}