/**
 * Renders a JSON-LD payload as a native <script> (the way Next.js recommends —
 * next/script is for executable JS). `<` is escaped to prevent XSS.
 */
export function JsonLdScript({ data }: { data: object }) {
  return (
    <script
      type="application/ld+json"
      dangerouslySetInnerHTML={{
        __html: JSON.stringify(data).replace(/</g, "\\u003c"),
      }}
    />
  );
}
