Created
November 25, 2020 22:55
-
-
Save kenakingkong/9b276d9b355beaa92415ec9a53b86e5b to your computer and use it in GitHub Desktop.
This file contains 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 { 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