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
+29 -3
View File
@@ -1,11 +1,37 @@
import { ContactSectionBlock as ContactSectionBlockType } from "@/gql/graphql";
import { graphql } from "@/gql";
import {
type ContactSectionBlockFragment,
type ContactSubsectionBlockFragment,
} from "@/gql/graphql";
import styles from "./contactSection.module.scss";
import { Blocks } from "./Blocks";
const ContactSectionBlockFragmentDefinition = graphql(`
fragment ContactSectionBlock on ContactSectionBlock {
title
text
blocks {
id
blockType
}
}
`);
const ContactSubsectionBlockFragmentDefinition = graphql(`
fragment ContactSubsectionBlock on ContactSubsectionBlock {
title
text
blocks {
id
blockType
}
}
`);
export const ContactSectionBlock = ({
block,
}: {
block: ContactSectionBlockType;
block: ContactSectionBlockFragment;
}) => {
return (
<section className={styles.contactSection}>
@@ -24,7 +50,7 @@ export const ContactSectionBlock = ({
export const ContactSubsectionBlock = ({
block,
}: {
block: ContactSectionBlockType;
block: ContactSubsectionBlockFragment;
}) => {
return (
<section className={styles.contactSubsection}>