diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-04 19:26:16 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:15:27 +0100 |
| commit | 2771de88f40a5f4ed7480bd8614532dda72deeda (patch) | |
| tree | ed4d1b9ee3f6322817efa2d1b1113c247367a12a /src/components/organisms/layout/comment.fixture.ts | |
| parent | c4a561c333f6f82678efcffef5ce3ed0f8e322f4 (diff) | |
refactor(components): rewrite CommentForm component
* remove `Notice` prop to handle it directly in the form
* replace `saveComment` prop with `onSubmit`
* use `useForm` hook to handle the form
Diffstat (limited to 'src/components/organisms/layout/comment.fixture.ts')
| -rw-r--r-- | src/components/organisms/layout/comment.fixture.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/components/organisms/layout/comment.fixture.ts b/src/components/organisms/layout/comment.fixture.ts index bb18d22..84aa20e 100644 --- a/src/components/organisms/layout/comment.fixture.ts +++ b/src/components/organisms/layout/comment.fixture.ts @@ -23,9 +23,7 @@ export const meta = { export const id = 5; -export const saveComment = async () => { - /** Do nothing. */ -}; +export const saveComment = () => undefined; export const data: UserCommentProps = { approved: true, @@ -33,5 +31,5 @@ export const data: UserCommentProps = { id, meta, parentId: 0, - saveComment, + onSubmit: saveComment, }; |
