diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-15 17:45:41 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-15 19:06:42 +0200 |
| commit | c95cce04393080a52a54191cff7be8fec68af4b0 (patch) | |
| tree | 1022bc574c8fc8e657be922b26c1cf16cbfd9071 /src/components/organisms/layout/comments-list.tsx | |
| parent | 235fe67d770f83131c9ec10b99012319440db690 (diff) | |
chore: add Article pages
Diffstat (limited to 'src/components/organisms/layout/comments-list.tsx')
| -rw-r--r-- | src/components/organisms/layout/comments-list.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/components/organisms/layout/comments-list.tsx b/src/components/organisms/layout/comments-list.tsx index 03f508e..f04354c 100644 --- a/src/components/organisms/layout/comments-list.tsx +++ b/src/components/organisms/layout/comments-list.tsx @@ -8,7 +8,7 @@ export type Comment = Omit<CommentProps, 'canReply' | 'saveComment'> & { child?: Comment[]; }; -export type CommentsListProps = { +export type CommentsListProps = Pick<CommentProps, 'Notice' | 'saveComment'> & { /** * An array of comments. */ @@ -17,10 +17,6 @@ export type CommentsListProps = { * The maximum depth. Use `0` to not display nested comments. */ depth: 0 | 1 | 2 | 3 | 4; - /** - * A callback function to save comment form data. - */ - saveComment: CommentProps['saveComment']; }; /** @@ -31,6 +27,7 @@ export type CommentsListProps = { const CommentsList: FC<CommentsListProps> = ({ comments, depth, + Notice, saveComment, }) => { /** @@ -48,8 +45,9 @@ const CommentsList: FC<CommentsListProps> = ({ return commentsList.map(({ child, ...comment }) => ( <li key={comment.id} className={styles.item}> <SingleComment - saveComment={saveComment} canReply={!isLastLevel} + Notice={Notice} + saveComment={saveComment} {...comment} /> {child && !isLastLevel && ( |
