Skip to content

Instantly share code, notes, and snippets.

@PhillJaySaw
Last active May 3, 2020 17:24
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 PhillJaySaw/afca04dc0e7f83ccb13bce49101cd312 to your computer and use it in GitHub Desktop.
Save PhillJaySaw/afca04dc0e7f83ccb13bce49101cd312 to your computer and use it in GitHub Desktop.
import React from "react"
import { graphql, StaticQuery } from 'gatsby';
import Layout from "../components/layout"
import SEO from "../components/seo"
const IndexPage = () => (
<Layout>
<SEO title="Home" />
<StaticQuery
query={graphql`
query TwitterPosts {
allTwitterStatusesUserTimelineGetPosts {
edges{
node{
full_text
entities{
urls{
url
}
}
created_at
favorite_count
}
}
}
}
`}
render={(data) => (
<div>
{
data.allTwitterStatusesUserTimelineGetPosts.edges.map((item, i) => (
<div key={i}>{item.node.full_text}</div>
)
)
}
</div>
)}
/>
</Layout>
)
export default IndexPage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment