Add initial project files

This commit is contained in:
Igor Martyniuk
2026-09-01 13:03:41 +03:00
parent 22e111bb44
commit 74cb5b6176
1841 changed files with 242819 additions and 30 deletions
@@ -0,0 +1,29 @@
import type { Media } from '../types';
export function MediaImage({
media,
eager = false,
className = ''
}: {
media?: Media;
eager?: boolean;
className?: string;
}) {
if (!media?.url) {
return null;
}
return (
// Media origins are CMS-managed and intentionally unrestricted, so a native image is used here.
// eslint-disable-next-line @next/next/no-img-element
<img
className={`block h-auto w-full object-cover ${className}`}
src={media.url}
alt={media.alt}
width={media.width}
height={media.height}
loading={eager ? 'eager' : 'lazy'}
fetchPriority={eager ? 'high' : 'auto'}
/>
);
}