Skip to content

Instantly share code, notes, and snippets.

@dance2die dance2die/index.js
Last active Jun 16, 2018

Embed
What would you like to do?
// imports and stuff ...
...
// "data" is passed by Gatsby with result of "StoriesQuery"
const IndexPage = ({ data }) => (
<Stories stories={data.allTopStories.edges} title="Top Stories" />
)
export default IndexPage
export const query = graphql`
query StoriesQuery {
allTopStories {
edges {
node {
id
storyId
item {
id
title
score
by
time
type
url
}
}
}
}
}
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.