git.iko.soy/rowtype-yoga/psfp
on 74e7b2d help sign in
35 lines 817 B history raw
1import React from "react";
2import PropTypes from "prop-types";
3import { graphql, useStaticQuery } from "gatsby";
4import { preToCodeBlock } from "mdx-utils";
5const psLayout = require("../../output/PSLayout"); // [FIXME] use the next line
6const fetch = typeof window !== "undefined" && window.fetch;
7import Img from "gatsby-image";
9const PSLayout = psLayout.mkLayout(fetch)();
10const MdxProvider = psLayout.mkLiveMdxProviderComponent(fetch)()
12const query = graphql`
13 query {
14 site {
15 siteMetadata {
16 title
17 menuLinks {
18 name
19 link
20 }
21 }
22 }
23 }
24`;
26const Layout = ({ children }) => {
27 const q = useStaticQuery(query);
28 return (
29 <PSLayout siteInfo={q.site} mdxProviderComponent={mdxProvider}>
30 {children}
31 </PSLayout>
32 );
33};
35export default Layout;