diff --git a/web/src/components/.keep b/web/src/components/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.js b/web/src/components/ArticlesCell/ArticlesCell.js similarity index 81% rename from web/src/components/BlogPostsCell/BlogPostsCell.js rename to web/src/components/ArticlesCell/ArticlesCell.js index a60caa5..f0f0087 100644 --- a/web/src/components/BlogPostsCell/BlogPostsCell.js +++ b/web/src/components/ArticlesCell/ArticlesCell.js @@ -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 }) =>
Error: {error.message}
export const Success = ({ posts }) => { return (
- {posts.map((post) => ( - + {articles.map((article) => ( +
))}
) diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.mock.js b/web/src/components/ArticlesCell/ArticlesCell.mock.js similarity index 100% rename from web/src/components/BlogPostsCell/BlogPostsCell.mock.js rename to web/src/components/ArticlesCell/ArticlesCell.mock.js diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.stories.js b/web/src/components/ArticlesCell/ArticlesCell.stories.js similarity index 66% rename from web/src/components/BlogPostsCell/BlogPostsCell.stories.js rename to web/src/components/ArticlesCell/ArticlesCell.stories.js index 841d3b2..a3134d3 100644 --- a/web/src/components/BlogPostsCell/BlogPostsCell.stories.js +++ b/web/src/components/ArticlesCell/ArticlesCell.stories.js @@ -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 ? : null @@ -17,4 +17,4 @@ export const success = () => { return Success ? : null } -export default { title: 'Cells/BlogPostsCell' } +export default { title: 'Cells/ArticlesCell' } diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.test.js b/web/src/components/ArticlesCell/ArticlesCell.test.js similarity index 84% rename from web/src/components/BlogPostsCell/BlogPostsCell.test.js rename to web/src/components/ArticlesCell/ArticlesCell.test.js index 1411048..1545e76 100644 --- a/web/src/components/BlogPostsCell/BlogPostsCell.test.js +++ b/web/src/components/ArticlesCell/ArticlesCell.test.js @@ -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()