This commit is contained in:
amirhosein.ashourloo
2026-08-20 00:34:24 +03:30
parent 149b77f734
commit 5f9ab22fd0
9 changed files with 67 additions and 4 deletions
+3 -1
View File
@@ -1,8 +1,10 @@
import type { StaticImageSlot } from "@/lib/types";
import { toCssAspectRatio } from "@/lib/format";
export default function FullBanner({ slot }: { slot?: StaticImageSlot }) {
const img = slot?.images[0];
const aspectStyle = slot?.aspectRatio ? { aspectRatio: slot.aspectRatio } : undefined;
const cssAspectRatio = toCssAspectRatio(slot?.aspectRatio);
const aspectStyle = cssAspectRatio ? { aspectRatio: cssAspectRatio } : undefined;
const src = img?.url ?? "/images/banners/full-banner.svg";
const href = img?.linkUrl ?? "#";