diff --git a/api/src/graphql/comments.sdl.ts b/api/src/graphql/comments.sdl.ts index cb6f63acb..272a67092 100644 --- a/api/src/graphql/comments.sdl.ts +++ b/api/src/graphql/comments.sdl.ts @@ -9,7 +9,7 @@ export const schema = gql` } type Query { - comments: [Comment!]! @requireAuth + comments: [Comment!]! @skipAuth } input CreateCommentInput { diff --git a/web/src/components/CommentsCell/CommentsCell.test.tsx b/web/src/components/CommentsCell/CommentsCell.test.tsx index 4532426ee..c44ac6858 100644 --- a/web/src/components/CommentsCell/CommentsCell.test.tsx +++ b/web/src/components/CommentsCell/CommentsCell.test.tsx @@ -19,6 +19,7 @@ describe('CommentsCell', () => { it('renders Empty successfully', async () => { expect(() => { render() + expect(screen.getByText('No comments yet')).toBeInTheDocument() }).not.toThrow() }) diff --git a/web/src/components/CommentsCell/CommentsCell.tsx b/web/src/components/CommentsCell/CommentsCell.tsx index 7bb69bf10..024e862e5 100644 --- a/web/src/components/CommentsCell/CommentsCell.tsx +++ b/web/src/components/CommentsCell/CommentsCell.tsx @@ -17,7 +17,9 @@ export const QUERY = gql` export const Loading = () =>
Loading...
-export const Empty = () =>
Empty
+export const Empty = () => ( +
No comments yet
+) export const Failure = ({ error }: CellFailureProps) => (
Error: {error?.message}