From ae6c5bd7686fe749b14937dbe813d12dce6f2f7a Mon Sep 17 00:00:00 2001 From: Nico Schett Date: Sun, 28 Apr 2024 14:07:00 +0200 Subject: [PATCH] fix: add gatsby queries --- src/pages/about.tsx | 17 +++++++++++++++++ src/pages/contact.tsx | 18 +++++++++++++++++- src/pages/index.tsx | 18 +++++++++++++++++- src/pages/process.tsx | 17 +++++++++++++++++ 4 files changed, 68 insertions(+), 2 deletions(-) diff --git a/src/pages/about.tsx b/src/pages/about.tsx index d2029ec..7f23d43 100644 --- a/src/pages/about.tsx +++ b/src/pages/about.tsx @@ -51,6 +51,7 @@ import sabineSulzer from "../images/team/michael-foster.jpeg"; import janEmig from "../images/team/jan.png"; import simonPrast from "../images/team/simon.webp"; import christianAichner from "../images/team/christian.webp"; +import { graphql } from "gatsby"; const team = [ { @@ -216,3 +217,19 @@ export default Page; export const pageConfig: PageConfig = { label: "Über uns", }; + +export const query = graphql` + query ($jaenPageId: String!) { + ...JaenPageQuery + allJaenPage { + nodes { + ...JaenPageData + children { + ...JaenPageData + } + } + } + } +`; + +export { Head } from "@atsnek/jaen"; diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index 433d1c2..1943edc 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -12,7 +12,7 @@ import { useNotificationsContext, } from "@atsnek/jaen"; import { zodResolver } from "@hookform/resolvers/zod"; -import { Link } from "gatsby"; +import { Link, graphql } from "gatsby"; import { forwardRef, useEffect, useId } from "react"; import { Form, @@ -355,3 +355,19 @@ export default Page; export const pageConfig: PageConfig = { label: "Contact", }; + +export const query = graphql` + query ($jaenPageId: String!) { + ...JaenPageQuery + allJaenPage { + nodes { + ...JaenPageData + children { + ...JaenPageData + } + } + } + } +`; + +export { Head } from "@atsnek/jaen"; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index e089262..18f82b9 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -5,7 +5,7 @@ import { List, ListItem } from "@/components/List"; import { SectionIntro } from "@/components/SectionIntro"; import { StylizedImage } from "@/components/StylizedImage"; import { Field, PageProps, useJaenPageIndex } from "@atsnek/jaen"; -import { Link } from "gatsby"; +import { Link, graphql } from "gatsby"; import React from "react"; import servicesSvg from "../images/services.svg"; @@ -260,3 +260,19 @@ const IndexPage: React.FC = () => { }; export default IndexPage; + +export const query = graphql` + query ($jaenPageId: String!) { + ...JaenPageQuery + allJaenPage { + nodes { + ...JaenPageData + children { + ...JaenPageData + } + } + } + } +`; + +export { Head } from "@atsnek/jaen"; diff --git a/src/pages/process.tsx b/src/pages/process.tsx index b395dff..b1d66ba 100644 --- a/src/pages/process.tsx +++ b/src/pages/process.tsx @@ -13,6 +13,7 @@ import { TagList, TagListItem } from "@/components/TagList"; import imageLaptop from "../images/laptop.jpg"; import imageMeeting from "../images/meeting.jpg"; import imageWhiteboard from "../images/whiteboard.jpg"; +import { graphql } from "gatsby"; function Section({ title, image, children }) { return ( @@ -261,3 +262,19 @@ export default Page; export const pageConfig: PageConfig = { label: "Contact", }; + +export const query = graphql` + query ($jaenPageId: String!) { + ...JaenPageQuery + allJaenPage { + nodes { + ...JaenPageData + children { + ...JaenPageData + } + } + } + } +`; + +export { Head } from "@atsnek/jaen";