git.iko.soy/rowtype-yoga/psfp
on 39a8a5d help sign in
36 lines 785 B history raw
1import React from "react";
2import { graphql, useStaticQuery } from "gatsby";
3// Load fonts
4require("../../static/fonts/fonts")
5const psLayout = require("../../output/PSLayout")
6const mdxProvider = require("../../output/MDXProvider")
7const fetch = typeof window !== "undefined" && window.fetch;
10const PSLayout = psLayout.mkLayout(fetch)();
11const MdxProvider = mdxProvider.mkLiveMdxProviderComponent(fetch)()
13const query = graphql`
14 query {
15 site {
16 siteMetadata {
17 title
18 menuLinks {
19 name
20 link
21 }
22 }
23 }
24 }
25`;
27const Layout = ({ children }) => {
28 const q = useStaticQuery(query);
29 return (
30 <PSLayout siteInfo={q.site} mdxProviderComponent={MdxProvider}>
31 {children}
32 </PSLayout>
33 );
34};
36export default Layout;