-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlayout.js
34 lines (30 loc) · 793 Bytes
/
layout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import Head from "./head"
import Nav from "./nav"
import "./layout.css"
const Layout = ({ location, children }) => {
const data = useStaticQuery(graphql`
query SiteInfoQuery {
site {
siteMetadata {
title
menuLinks {
name
link
}
}
}
}
`)
const {title, menuLinks} = data.site.siteMetadata
return (
<>
<Head title={title}/>
<Nav location={location || ''} title={title} menuLinks={menuLinks} />
<main className="Content">{children}</main>
<footer className="Footer">Gastby CETEIcean Workshop - Code license: MIT - Contents license: CC-A-NC-SA 4.0</footer>
</>
)
}
export default Layout