website refactor

This commit is contained in:
2026-01-14 16:28:39 +01:00
parent 85e09b6f4d
commit 4b7d82ab43
119 changed files with 2403 additions and 1615 deletions

View File

@@ -0,0 +1,27 @@
/**
* CategoryIcon
*
* Pure UI component for displaying category icons.
* Renders an image with fallback on error.
*/
export interface CategoryIconProps {
categoryId: string;
alt: string;
className?: string;
}
export function CategoryIcon({ categoryId, alt, className = '' }: CategoryIconProps) {
return (
// eslint-disable-next-line @next/next/no-img-element
<img
src={`/media/categories/${categoryId}/icon`}
alt={alt}
className={`w-6 h-6 object-contain ${className}`}
onError={(e) => {
// Fallback to default icon
(e.target as HTMLImageElement).src = '/default-category-icon.png';
}}
/>
);
}