diff --git a/gatsby-node.js b/gatsby-node.js index e548153..721a335 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -152,13 +152,6 @@ exports.createPages = ({ actions, graphql }) => { }, }) }) - - // Create the booking page - // const bookingTemplate = path.resolve(`./src/templates/booking.js`) - // createPage({ - // path: `/booking/`, - // component: bookingTemplate, - // }) }) .then(() => { return graphql(` diff --git a/src/pages/booking.js b/src/pages/booking.js new file mode 100644 index 0000000..fa288fe --- /dev/null +++ b/src/pages/booking.js @@ -0,0 +1,41 @@ +import React from 'react' +import { graphql, useStaticQuery } from 'gatsby' +import Layout from '../components/Layout' + +export const bookingPageQuery = graphql` + query BookingPage { + wordpressPage(slug: { eq: "booking" }) { + title + content + } + allWordpressWpVenues( + sort: { fields: date, order: DESC } + ) { + totalCount + edges { + node { + ...VenueFields + } + } + } + } +` + +export const BookingPage = () => { + const data = useStaticQuery(bookingPageQuery) + const { title, content } = data.wordpressPage + + return ( + +
+

{title}

+
+
+
+ ) +} + +export default BookingPage