import { useTranslation } from "next-i18next" import { Virtuoso } from "react-virtuoso" import { CommentInput } from "~/components/common/CommentInput" import { CommentItem } from "~/components/common/CommentItem" import { Note } from "~/lib/types" import { cn } from "~/lib/utils" import { useGetComments } from "~/queries/page" export const Comment: React.FC<{ page?: Note | null className?: string }> = ({ page, className }) => { const comments = useGetComments({ pageId: page?.id, }) const { t } = useTranslation("common") return (