import Image from "next/image";
import { Check } from "lucide-react";
import type { CmsProductContent } from "@/types/cms-landing";
const DEFAULT_TITLE =
"The product we offer is designed to meet your business needs.";
const DEFAULT_BODY =
"Social media marketing services are provided by companies or individuals who specialize in marketing strategies through social media platforms.";
function cardImageUrl(p: CmsProductContent) {
return p.images?.[0]?.image_url?.trim() || "/image/p1.png";
}
export default function ProductSection({
products,
}: {
products?: CmsProductContent[] | null;
}) {
const list = products?.filter((p) => p.id) ?? [];
if (list.length === 0) {
return (
Our Product
{DEFAULT_TITLE}
MediaHUB Content Aggregator
{DEFAULT_BODY}
);
}
const first = list[0];
const sectionTitle =
first?.primary_title?.trim() || "Products tailored to your business";
const subtitle = first?.secondary_title?.trim();
return (