Newer
Older
import React, { ReactElement } from "react"
import { graphql, PageProps } from "gatsby"
import { Layout, Sections } from "@onegeo-suite/gatsby-theme-onegeo"
}
}
}
function Index({ data }: PageProps<IData>): ReactElement {
const sections = data.directus.site.sections
const options = data.directus.site.options ?? {}
const ids = sections.map((section) => section.sections_id.id)
if (!ids || ids.length == 0) return <Layout>No section !</Layout>
<Sections ids={ids} />
</Layout>
)
sections(
sort: "sort"
filter: { sections_id: { status: { _eq: "published" } } }
) {
sections_id {