type SchemaProps = {
  schema: Record<string, unknown> | Array<Record<string, unknown>>;
};

export function PageSchema({ schema }: SchemaProps) {
  const payload = Array.isArray(schema) ? schema : [schema];
  return (
    <script
      type="application/ld+json"
      dangerouslySetInnerHTML={{ __html: JSON.stringify(payload) }}
    />
  );
}
