web: colocate graphql fragments, unmask where needed, more idiomatic client-preset use

This commit is contained in:
2026-05-19 01:49:58 +02:00
parent bc8642b1fc
commit b09ce9808d
29 changed files with 2065 additions and 7283 deletions
+9 -5
View File
@@ -1,14 +1,18 @@
import { FactBoxBlock as FactBoxBlockType } from "@/gql/graphql";
import { graphql } from "@/gql";
import { type FactBoxBlockFragment } from "@/gql/graphql";
import styles from "./factBoxBlock.module.scss";
type FactBoxBlockTypeWithAlias = FactBoxBlockType & {
factBoxBody?: string;
};
const FactBoxBlockFragmentDefinition = graphql(`
fragment FactBoxBlock on FactBoxBlock {
backgroundColor
factBoxBody: body
}
`);
export const FactBoxBlock = ({
block,
}: {
block: FactBoxBlockTypeWithAlias;
block: FactBoxBlockFragment;
}) => {
if (!block.factBoxBody) {
return <></>;