'use client';
import { useState } from 'react';
import ItemUser from './ItemUser'

function CommentUser({ doctor }) {

    const [list, setList] = useState(doctor.comments);
    const [update, setUpdate] = useState(false);

    return (
        <ul className={`flex flex-col !pl-2.5 justify-start max-h-[492px] overflow-auto items-start gap-12 mt-2 ${false && 'w-full'}`}>
            {doctor && !!doctor.comments.length && doctor.comments.map((item, idx) => (
                <ItemUser
                    key={idx}
                    list={list}
                    data={item}
                    update={update}
                    loading={false}
                    setList={setList}
                    setUpdate={setUpdate}
                />
            ))}
        </ul>
    )
}

export default CommentUser