web: FactBoxBlock does not use useState

This commit is contained in:
2025-07-21 00:31:04 +02:00
parent dfb61aa417
commit 1da9b4dce8

View File

@@ -1,19 +1,24 @@
import { useId, useState } from "react";
import { FactBoxBlock as FactBoxBlockType } from "@/gql/graphql"; import { FactBoxBlock as FactBoxBlockType } from "@/gql/graphql";
import styles from "./factBoxBlock.module.scss"; import styles from "./factBoxBlock.module.scss";
import { Blocks } from "./Blocks";
type FactBoxBlockTypeWithAlias = FactBoxBlockType & { type FactBoxBlockTypeWithAlias = FactBoxBlockType & {
factBoxBody?: string factBoxBody?: string;
} };
export const FactBoxBlock = ({ block }: { block: FactBoxBlockTypeWithAlias }) => { export const FactBoxBlock = ({
block,
}: {
block: FactBoxBlockTypeWithAlias;
}) => {
if (!block.factBoxBody) { if (!block.factBoxBody) {
return <></>; return <></>;
} }
return ( return (
<section className={styles.factBoxWrapper}> <section className={styles.factBoxWrapper}>
<div className={styles.factBox} data-background-color={block.backgroundColor ?? ""}> <div
className={styles.factBox}
data-background-color={block.backgroundColor ?? ""}
>
<div <div
className={styles.factBoxContent} className={styles.factBoxContent}
dangerouslySetInnerHTML={{ __html: block.factBoxBody }} dangerouslySetInnerHTML={{ __html: block.factBoxBody }}