Rename BlogPostsCell -> ArticlesCell
This commit is contained in:
29
web/src/components/ArticlesCell/ArticlesCell.js
Normal file
29
web/src/components/ArticlesCell/ArticlesCell.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Link, routes } from '@redwoodjs/router'
|
||||
import BlogPost from 'src/components/BlogPost'
|
||||
|
||||
export const QUERY = gql`
|
||||
query BlogPostsQuery {
|
||||
articles: 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 (
|
||||
<div className="space-y-10">
|
||||
{articles.map((article) => (
|
||||
<Article articles={articles} key={article.id} />
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user