diff --git a/src/components/Layout/Layout.js b/src/components/Layout/Layout.js index e01d749..1d087a7 100644 --- a/src/components/Layout/Layout.js +++ b/src/components/Layout/Layout.js @@ -13,7 +13,7 @@ type Props = { socialImage? :string }; -const Layout = ({ +const Layout = ({ children, title, description, diff --git a/src/templates/page-template.js b/src/templates/page-template.js index 4440f8c..ce6f2ce 100644 --- a/src/templates/page-template.js +++ b/src/templates/page-template.js @@ -16,7 +16,7 @@ type Props = { const PageTemplate = ({ data }: Props) => { const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata(); const { html: pageBody } = data.markdownRemark; - const frontmatter = data.markdownRemark.frontmatter; + const { frontmatter } = data.markdownRemark; const { title: pageTitle, description: pageDescription, socialImage } = frontmatter; const metaDescription = pageDescription !== null ? pageDescription : siteSubtitle; diff --git a/src/templates/post-template.js b/src/templates/post-template.js index 3f3cb44..801bc1f 100644 --- a/src/templates/post-template.js +++ b/src/templates/post-template.js @@ -14,7 +14,7 @@ type Props = { const PostTemplate = ({ data }: Props) => { const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata(); - const frontmatter = data.markdownRemark.frontmatter; + const { frontmatter } = data.markdownRemark; const { title: postTitle, description: postDescription, socialImage } = frontmatter; const metaDescription = postDescription !== null ? postDescription : siteSubtitle;