import { graphql } from "@/gql";
import { type RichTextBlockFragment } from "@/gql/graphql";
import styles from "./richTextBlock.module.scss";

const RichTextBlockFragmentDefinition = graphql(`
  fragment RichTextBlock on RichTextBlock {
    rawValue
    value
  }
`);

export const RichTextBlock = ({ block }: { block: RichTextBlockFragment }) => {
  return (
    <div
      className={styles.richTextBlock}
      dangerouslySetInnerHTML={{ __html: block.value }}
    ></div>
  );
};
