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

View File

@@ -1,5 +1,5 @@
import { Loading, Empty, Failure, Success } from './BlogPostsCell' import { Loading, Empty, Failure, Success } from './ArticlesCell'
import { standard } from './BlogPostsCell.mock' import { standard } from './ArticlesCell.mock'
export const loading = () => { export const loading = () => {
return Loading ? <Loading /> : null return Loading ? <Loading /> : null
@@ -17,4 +17,4 @@ export const success = () => {
return Success ? <Success {...standard()} /> : null 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 { render, screen } from '@redwoodjs/testing'
import { Loading, Empty, Failure, Success } from './BlogPostsCell' import { Loading, Empty, Failure, Success } from './ArticlesCell'
import { standard } from './BlogPostsCell.mock' import { standard } from './ArticlesCell.mock'
describe('BlogPostsCell', () => { describe('ArticlesCell', () => {
test('Loading renders successfully', () => { test('Loading renders successfully', () => {
expect(() => { expect(() => {
render(<Loading />) render(<Loading />)