web: colocate graphql fragments, unmask where needed, more idiomatic client-preset use
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
import { ContactListBlock as ContactListBlockType } from "@/gql/graphql";
|
||||
import { graphql } from "@/gql";
|
||||
import { type ContactListBlockFragment } from "@/gql/graphql";
|
||||
import styles from "./contactListBlock.module.scss";
|
||||
import { Blocks } from "./Blocks";
|
||||
|
||||
const ContactListBlockFragmentDefinition = graphql(`
|
||||
fragment ContactListBlock on ContactListBlock {
|
||||
items {
|
||||
blockType
|
||||
... on ContactEntityBlock {
|
||||
contactEntity {
|
||||
...ContactEntity
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
export const ContactListBlock = ({
|
||||
block,
|
||||
}: {
|
||||
block: ContactListBlockType;
|
||||
block: ContactListBlockFragment;
|
||||
}) => {
|
||||
return (
|
||||
<ul className={styles.contactList}>
|
||||
|
||||
Reference in New Issue
Block a user