import {List, ListItem} from "@mui/material";

export default function CommentsList({comments}: {comments: string[]|undefined}){
    if (!comments){
        return (<></>)
    }
    if (comments.length > 0){
        return (
            <>
                <p className="report-content-header">Comments:</p>
                <List>
                    {comments.map((item) => {
                        return <ListItem className="report-comment">{item}</ListItem>
                    })}
                </List>
            </>
        )
    } else {
        return (<></>)
    }
}