import { useStaticQuery, graphql } from "gatsby"

export const useFavicon = () => {
  const { favicon: { original } } = useStaticQuery(
    graphql`
      query Favicon {
        favicon: imageSharp(original: { src: { regex: "/favicon/" } }) {
          original {
            width
            height
            src
          }
        }
      }
    `
  )
  return original
}
