23 lines
647 B
TypeScript
23 lines
647 B
TypeScript
import React, { useEffect } from 'react'
|
|
import CommentInstance from './commentInstance/commentInstance'
|
|
import { useCommentStore } from '../../../../store/collaboration/useCommentStore'
|
|
|
|
function CommentInstances() {
|
|
const { comments } = useCommentStore();
|
|
|
|
useEffect(() => {
|
|
console.log('comments: ', comments);
|
|
}, [comments])
|
|
|
|
return (
|
|
<>
|
|
{comments.map((comment: CommentSchema) => (
|
|
<React.Fragment key={comment.commentId}>
|
|
<CommentInstance comment={comment} />
|
|
</React.Fragment>
|
|
))}
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default CommentInstances |