Pre-deployment
This commit is contained in:
23
web/src/components/BlogPostsCell/BlogPostsCell.js
Normal file
23
web/src/components/BlogPostsCell/BlogPostsCell.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Link,routes } from '@redwoodjs/router'
|
||||
import BlogPost from 'src/components/BlogPost'
|
||||
|
||||
export const QUERY = gql`
|
||||
query BlogPostsQuery {
|
||||
posts {
|
||||
id
|
||||
title
|
||||
body
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const Loading = () => <div>Loading...</div>
|
||||
|
||||
export const Empty = () => <div>Empty</div>
|
||||
|
||||
export const Failure = ({ error }) => <div>Error: {error.message}</div>
|
||||
|
||||
export const Success = ({ posts }) => {
|
||||
return posts.map((post) => <BlogPost key={post.id} post={post} />)
|
||||
}
|
||||
Reference in New Issue
Block a user