ThreadCommentList.tsx (571B)
1 import ThreadCommentView from '@/components/threads/ThreadCommentView' 2 import { ThreadComment } from '@/lib/models/thread' 3 import styles from './ThreadCommentList.module.css' 4 5 export interface ThreadCommentListProps { 6 comments: ThreadComment[] 7 startsFrom: number 8 } 9 10 export default function ThreadCommentList (props: ThreadCommentListProps) { 11 return ( 12 <div className={styles['comment-list']}> 13 {props.comments.map((comment, i) => ( 14 <ThreadCommentView key={comment.id} index={props.startsFrom - i - 1} comment={comment} /> 15 ))} 16 </div> 17 ) 18 }