From 1d183b92c63b0465cb1814759df70fbe97d6b45b Mon Sep 17 00:00:00 2001 From: Jerel Miller Date: Wed, 29 Jul 2020 14:08:44 -0700 Subject: [PATCH] feat: create a related content component --- src/components/RelatedContent.js | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/components/RelatedContent.js diff --git a/src/components/RelatedContent.js b/src/components/RelatedContent.js new file mode 100644 index 000000000..639b32c3e --- /dev/null +++ b/src/components/RelatedContent.js @@ -0,0 +1,70 @@ +import React, { useContext } from 'react'; +import { css } from '@emotion/core'; +import { graphql, useStaticQuery } from 'gatsby'; +import { Button, ExternalLink, Icon } from '@newrelic/gatsby-theme-newrelic'; +import { PageContext } from './PageContext'; + +const RelatedContent = ({ className }) => { + const { site } = useStaticQuery(graphql` + query { + site { + siteMetadata { + repository + } + layout { + contentPadding + } + } + } + `); + const { fileRelativePath } = useContext(PageContext); + + const { + layout, + siteMetadata: { repository }, + } = site; + + return ( + + ); +}; + +export default RelatedContent;