feat: graphql client with fetches for initial pages

This commit is contained in:
Simon Emanuelsson
2024-02-01 16:19:16 +01:00
parent a91781137a
commit 5e974aa3da
56 changed files with 2580 additions and 1512 deletions

View File

@@ -0,0 +1,7 @@
export default function List() {
return (
<>
</>
)
}

View File

@@ -0,0 +1,7 @@
export default function Preamble() {
return (
<>
</>
)
}

View File

@@ -0,0 +1,7 @@
export default function Puffs() {
return (
<>
</>
)
}

View File

@@ -0,0 +1,32 @@
import { rteType } from "@/types/rte";
import Image from "next/image";
import type { TextProps } from "@/types/components/current/blocks/text"
export default function Text({ text }: TextProps) {
return (
<>
<pre>{JSON.stringify(text.content.json, null, 2)}</pre>
{text.content.json.children.map(block => {
switch (block.type) {
case rteType.reference: {
if (block.attrs.type === rteType.asset) {
// return (
// <Image
// alt={block.attrs.alt}
// src={block.attrs["asset-link"]}
// />
// )
}
return null
}
default:
break;
}
})}
</>
)
}