web: FactBoxBlock does not use useState
This commit is contained in:
@@ -1,19 +1,24 @@
|
||||
import { useId, useState } from "react";
|
||||
import { FactBoxBlock as FactBoxBlockType } from "@/gql/graphql";
|
||||
import styles from "./factBoxBlock.module.scss";
|
||||
import { Blocks } from "./Blocks";
|
||||
|
||||
type FactBoxBlockTypeWithAlias = FactBoxBlockType & {
|
||||
factBoxBody?: string
|
||||
}
|
||||
factBoxBody?: string;
|
||||
};
|
||||
|
||||
export const FactBoxBlock = ({ block }: { block: FactBoxBlockTypeWithAlias }) => {
|
||||
export const FactBoxBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: FactBoxBlockTypeWithAlias;
|
||||
}) => {
|
||||
if (!block.factBoxBody) {
|
||||
return <></>;
|
||||
}
|
||||
return (
|
||||
<section className={styles.factBoxWrapper}>
|
||||
<div className={styles.factBox} data-background-color={block.backgroundColor ?? ""}>
|
||||
<div
|
||||
className={styles.factBox}
|
||||
data-background-color={block.backgroundColor ?? ""}
|
||||
>
|
||||
<div
|
||||
className={styles.factBoxContent}
|
||||
dangerouslySetInnerHTML={{ __html: block.factBoxBody }}
|
||||
|
Reference in New Issue
Block a user