Skip to content

Instantly share code, notes, and snippets.

@staylor
Created October 12, 2018 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staylor/fb6f6a021ff0e6920f5704e89244ac9c to your computer and use it in GitHub Desktop.
Save staylor/fb6f6a021ff0e6920f5704e89244ac9c to your computer and use it in GitHub Desktop.
import React from 'react';
import Weather from 'components/Weather';
export default function HelloPage({ data }) {
const { site: { siteMetadata } } = data;
return (
<article>
<h1>{siteMetadata.title}</h1>
<p>{siteMetadata.description}</p>
<Weather weatherKey={siteMetadata.openWeatherMapApiKey} />
</article>
);
}
export const query = graphql`
query HomeQuery {
site {
siteMetadata {
title
description
openWeatherMapApiKey
}
}
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment