diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx
index 9275875..21b6078 100644
--- a/src/components/Layout.jsx
+++ b/src/components/Layout.jsx
@@ -61,12 +61,9 @@ const TemplateWrapper = ({ children, location }) => {
}
availability {
status
- available
- unavailable
}
gpg
addressbook
- typekitID
}
# the package.json file
diff --git a/src/components/atoms/Head.jsx b/src/components/atoms/Head.jsx
index 13ddad9..517f9c6 100644
--- a/src/components/atoms/Head.jsx
+++ b/src/components/atoms/Head.jsx
@@ -5,7 +5,7 @@ import SEO from './SEO'
import Typekit from './Typekit'
const Head = ({ meta }) => {
- const { title, tagline, typekitID } = meta
+ const { title, tagline } = meta
return (
@@ -16,7 +16,7 @@ const Head = ({ meta }) => {
- {typekitID && }
+
diff --git a/src/components/atoms/Typekit.js b/src/components/atoms/Typekit.js
index a0b5d70..9d4c691 100644
--- a/src/components/atoms/Typekit.js
+++ b/src/components/atoms/Typekit.js
@@ -1,13 +1,14 @@
import React from 'react'
import PropTypes from 'prop-types'
+import { StaticQuery, graphql } from 'gatsby'
import Helmet from 'react-helmet'
-const TypekitScript = props => (
+const TypekitScript = typekitID => (
)
-const Typekit = props => (
-
-
-
+const Typekit = () => (
+ {
+ const { typekitID } = data.dataYaml
- {TypekitScript(props)}
-
+ return (
+ typekitID && (
+
+
+
+
+ {TypekitScript(typekitID)}
+
+ )
+ )
+ }}
+ />
)
export default Typekit
diff --git a/src/components/molecules/Availability.jsx b/src/components/molecules/Availability.jsx
index e71b367..d5f3e75 100644
--- a/src/components/molecules/Availability.jsx
+++ b/src/components/molecules/Availability.jsx
@@ -1,5 +1,6 @@
import React, { Fragment, PureComponent } from 'react'
import PropTypes from 'prop-types'
+import { StaticQuery, graphql } from 'gatsby'
import { MoveIn } from '../atoms/Animations'
import styles from './Availability.module.scss'
@@ -9,35 +10,51 @@ class Availability extends PureComponent {
}
render() {
- const { availability } = this.props.meta
- const { status, available, unavailable } = availability
-
return (
-
- {!this.props.hide && (
-
-
-
- )}
-
+ }
+ }
+ `}
+ render={data => {
+ const { availability } = data.dataYaml
+ const { status, available, unavailable } = availability
+
+ return (
+
+ {!this.props.hide && (
+
+
+
+ )}
+
+ )
+ }}
+ />
)
}
}
Availability.propTypes = {
- meta: PropTypes.object,
hide: PropTypes.bool
}
diff --git a/src/components/organisms/Header.jsx b/src/components/organisms/Header.jsx
index 361820b..4c718f3 100644
--- a/src/components/organisms/Header.jsx
+++ b/src/components/organisms/Header.jsx
@@ -46,10 +46,7 @@ class Header extends PureComponent {
-
+
)
}