Skip to content

integrating optional DSG question #33958

Answered by LekoArts
3200pro asked this question in Help
Nov 12, 2021 · 2 comments · 9 replies
Discussion options

You must be logged in to vote

With this it's all working fine:

Code
import React from 'react'
import { graphql } from 'gatsby'
import Layout from "../components/layout"
import Seo from "../components/seo"
  
const Page = ({ data }) => {
  const { title } = data.page
  return (
    <Layout>
      <Seo title="Post" />
      <h1>{title}</h1>
      
    </Layout>
  )
}

export default Page 

export const query = graphql`
query($id: String) {
  page: sanitySiteRoute(id: { eq: $id }) {
    title
    slug {
      current
    }
    pageType
  }
}
`

export async function config() {
  const { data } = graphql`
    {
      allSanitySiteRoute(filter: {pageType: {eq: "DSG"}}){
        nodes {
          pageType
          slug {

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
8 replies
@3200pro
Comment options

@LekoArts
Comment options

@3200pro
Comment options

@LekoArts
Comment options

@3200pro
Comment options

Comment options

You must be logged in to vote
1 reply
@3200pro
Comment options

Answer selected by LekoArts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants