Created
October 12, 2018 19:25
-
-
Save staylor/fb6f6a021ff0e6920f5704e89244ac9c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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