import Image from "next/image"; import { getTrustBadges } from "../lib/payload"; // Content now lives in Payload (TrustBadges collection) instead of being // hardcoded here, so copy (e.g. the shipping timeframe/threshold numbers) // can be updated without a code deploy. If the fetch fails or nothing is // seeded yet, the row just doesn't render rather than showing stale // hardcoded fallback text that could drift from the real numbers. export async function TrustRow() { const items = await getTrustBadges(); if (items.length === 0) return null; return ( // Structural breakpoint is lg:, not sm: — a deliberate exception to // the site's sm: (640px) structural consolidation, same category as // Footer's legal-links row (see that component's own comment): // multiple whitespace-nowrap title+description badges side by side // don't fit in one row below ~1024px regardless of fluid scaling. // Confirmed via a real horizontal-overflow measurement against the // live site (2026-07-29): scrollWidth exceeded the viewport by // ~100px at 666px and ~54px at 768px before this fix. // // Alignment is tiered, same pattern as Hero's social-proof row: // centered below sm: (true Mobile), left-aligned from sm: to lg: // (each stacked badge's left edge lines up via items-start — no risk // of a "crooked" look since it's a shared start edge, not per-badge // centering), centered again once it's a single row at lg:.
{item.title}
{item.description}