1 import { CommentView } from "lemmy-js-client";
2 import { CommentNodeI } from "../../interfaces";
4 export default function commentsToFlatNodes(
5 comments: CommentView[]
7 const nodes: CommentNodeI[] = [];
8 for (const comment of comments) {
9 nodes.push({ comment_view: comment, children: [], depth: 0 });