diff --git a/src/components/common/Comment.tsx b/src/components/common/Comment.tsx index 90428864..6b8a7864 100644 --- a/src/components/common/Comment.tsx +++ b/src/components/common/Comment.tsx @@ -1,5 +1,6 @@ "use client" +import { useState } from "react" // TODO import { Virtuoso } from "react-virtuoso" @@ -29,6 +30,8 @@ const Comment = ({ (page) => (page?.list?.length ?? 0) > 0, ) + const [totalListHeight, setTotalListHeight] = useState(1) + return (
{ + if (fixHeight && height > 0) { + setTotalListHeight(Math.min(height + 71, 900)) + } + }} itemContent={(_, p) => p?.list?.map((comment, idx) => (