Rename BlogPostsCell -> ArticlesCell

This commit is contained in:
Rob Cameron
2022-02-08 15:00:33 -08:00
parent bcd217e1d9
commit 82cc078d74
5 changed files with 9 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ import BlogPost from 'src/components/BlogPost'
export const QUERY = gql`
query BlogPostsQuery {
posts {
articles: posts {
id
title
body
@@ -21,8 +21,8 @@ export const Failure = ({ error }) => <div>Error: {error.message}</div>
export const Success = ({ posts }) => {
return (
<div className="space-y-10">
{posts.map((post) => (
<BlogPost post={post} key={post.id} />
{articles.map((article) => (
<Article articles={articles} key={article.id} />
))}
</div>
)

View File

@@ -1,5 +1,5 @@
import { Loading, Empty, Failure, Success } from './BlogPostsCell'
import { standard } from './BlogPostsCell.mock'
import { Loading, Empty, Failure, Success } from './ArticlesCell'
import { standard } from './ArticlesCell.mock'
export const loading = () => {
return Loading ? <Loading /> : null
@@ -17,4 +17,4 @@ export const success = () => {
return Success ? <Success {...standard()} /> : null
}
export default { title: 'Cells/BlogPostsCell' }
export default { title: 'Cells/ArticlesCell' }

View File

@@ -1,8 +1,8 @@
import { render, screen } from '@redwoodjs/testing'
import { Loading, Empty, Failure, Success } from './BlogPostsCell'
import { standard } from './BlogPostsCell.mock'
import { Loading, Empty, Failure, Success } from './ArticlesCell'
import { standard } from './ArticlesCell.mock'
describe('BlogPostsCell', () => {
describe('ArticlesCell', () => {
test('Loading renders successfully', () => {
expect(() => {
render(<Loading />)