/** * Bio component that queries for data * with Gatsby's useStaticQuery component * * See: https://www.gatsbyjs.com/docs/how-to/querying-data/use-static-query/ */ import * as React from "react" import { useStaticQuery, graphql } from "gatsby" import { StaticImage } from "gatsby-plugin-image" const Bio = () => { const data = useStaticQuery(graphql` query BioQuery { site { siteMetadata { author { name summary } social { twitter } } } } `) // Set these values by editing "siteMetadata" in gatsby-config.js const author = data.site.siteMetadata?.author const social = data.site.siteMetadata?.social return (
{author?.name && (

Written by {author.name} {author?.summary || null} {` `} You should follow them on Twitter

)}
) } export default Bio