Files
nobat724_front/app/component/comment/index.js
T

29 lines
627 B
JavaScript

"use client";
import { useState } from "react";
import ItemUser from "./ItemUser";
function Comment({ comments }) {
const [update, setUpdate] = useState(false);
return (
<ul
className={`flex flex-col comment-list !pl-2.5 justify-start max-h-[492px] overflow-auto items-start gap-12 mt-2 ${
false && "w-full"
}`}
>
{comments &&
comments.length &&
comments.map((item, idx) => (
<ItemUser
key={idx}
data={item}
update={update}
setUpdate={setUpdate}
/>
))}
</ul>
);
}
export default Comment;