"use client"; import Image from "next/image"; import { memo } from "react"; import ContentContainer from "../../content/ContentContainer"; import Rule from "../../cards/Rule"; import { getAssetPath, guideBannerLogoArrowPath, } from "../../../../lib/assetUtils"; import type { ContentBannerViewProps } from "./ContentBanner.types"; /** * Figma: ContentBanner on content page template (22078:791901) — left column * title + description; logo mark (22078:806960) in right column. */ function ContentBannerGuideView({ post, }: Pick) { const { title, description } = post.frontmatter; return (

{title}

{description ? (

{description}

) : null}
{/* eslint-disable-next-line @next/next/no-img-element */}
); } function ContentBannerArticleView({ post, leadingImageSrc, leadingImageAlt, backgroundImageSm, backgroundImageMd, }: ContentBannerViewProps) { if (!backgroundImageSm || !backgroundImageMd) { return null; } return (
); } /** * Figma: use case detail ContentBanner (22015:42621) — copy left, Rule preview right. */ function ContentBannerUseCaseView({ post, rulePreview, }: Pick) { if (!rulePreview) { return null; } const { title, description, author, date } = post.frontmatter; const formattedDate = new Date(date).toLocaleDateString("en-US", { year: "numeric", month: "long", }); return (

{title}

{description ? (

{description}

) : null}
{author} {formattedDate}
} />
); } function ContentBannerView(props: ContentBannerViewProps) { if (props.variant === "guide") { return ; } if (props.variant === "useCase") { return ; } return ; } ContentBannerView.displayName = "ContentBannerView"; export default memo(ContentBannerView);