Skip to content

Commit

Permalink
react-reveal demo
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiya29 committed Oct 18, 2019
1 parent 00c3b75 commit b921848
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"mkdirp": "^0.5.1",
"node-gyp": "^3.8.0",
"prettier": "^1.16.0",
"react-reveal": "^1.2.2",
"react-social-icons": "^4.1.0"
}
}
11 changes: 7 additions & 4 deletions src/components/recentPosts/recentPosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import React from 'react';
import { StaticQuery, graphql } from 'gatsby';
import Card from 'containers/card';
import PostPreview from 'components/postPreview';
import Fade from 'react-reveal/Fade';

const LISTING_QUERY = graphql`
query RecentPostsQuery {
allMarkdownRemark(
limit: 5
limit: 100
sort: { order: DESC, fields: [frontmatter___date] }
) {
edges {
Expand Down Expand Up @@ -38,9 +39,11 @@ const RecentPosts = () => (
query={LISTING_QUERY}
render={({ allMarkdownRemark }) =>
allMarkdownRemark.edges.map(({ node }) => (
<Card key={node.fields.slug} mb={[40, 50]}>
<PostPreview {...node} />
</Card>
<Fade bottom key={node.fields.slug}>
<Card mb={[40, 50]}>
<PostPreview {...node} />
</Card>
</Fade>
))
}
/>
Expand Down

0 comments on commit b921848

Please sign in to comment.