/**
 * JsonLd: render array of JSON-LD strings safely.
 * Used in post pages to mirror Rank Math schema markup.
 */
export function JsonLd({ blocks }: { blocks: string[] }) {
  if (!blocks?.length) return null;
  return (
    <>
      {blocks.map((b, i) => (
        <script
          key={i}
          type="application/ld+json"
          // The blocks come from our own SEO mirror that has rewritten URLs.
          // We trust them since they originate from controlled WP HTML head.
          dangerouslySetInnerHTML={{ __html: b }}
        />
      ))}
    </>
  );
}
