import React from "react";
import { graphql } from "gatsby";
import Layout from "../components/layout"

export default function Page({ headerInfo, pageTitle, children }) {
    return (
        <Layout title={headerInfo.title} tagline={headerInfo.tagline}>
            <article className="page">
                <h1 className="page-title">{pageTitle}</h1>
                {children}
            </article>
        </Layout>
    );
}

export const query = graphql`
    fragment HeaderInfo on Site {        
        siteMetadata {
            title
            tagline
        }
    }
`;