Skip to content

Instantly share code, notes, and snippets.

@kenakingkong
Created November 25, 2020 22:55
Show Gist options
  • Save kenakingkong/9b276d9b355beaa92415ec9a53b86e5b to your computer and use it in GitHub Desktop.
Save kenakingkong/9b276d9b355beaa92415ec9a53b86e5b to your computer and use it in GitHub Desktop.
import React from 'react';
import { StaticQuery, graphql } from "gatsby"
import { CardWrapper } from 'react-swipeable-cards';
import {MyCard, MyEndCard} from './mycard'
const Stack = () => (
<StaticQuery
query={graphql`
query MediumFeedQuery {
allMediumFeed {
nodes {
title
link
date(formatString: "MM-DD-YYYY")
content
}
totalCount
}
}
`}
render={poems => (
<CardWrapper addEndCard={() => <MyEndCard />}>
{poems.allMediumFeed.nodes.map(poem => (
<MyCard poem={poem} />
))}
</CardWrapper>
)}
/>
)
export default Stack;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment