import React, { FC, HTMLAttributes, memo } from 'react'; import { CommentWrapper } from '~/components/containers/CommentWrapper'; import { IComment, ICommentGroup, IFile } from '~/redux/types'; import { CommentContent } from '~/components/comment/CommentContent'; import styles from './styles.module.scss'; import { CommendDeleted } from '../../node/CommendDeleted'; import * as MODAL_ACTIONS from '~/redux/modal/actions'; type IProps = HTMLAttributes & { is_empty?: boolean; is_loading?: boolean; comment_group: ICommentGroup; is_same?: boolean; can_edit?: boolean; onDelete: (id: IComment['id'], isLocked: boolean) => void; modalShowPhotoswipe: (images: IFile[], index: number) => void; }; const Comment: FC = memo( ({ comment_group, is_empty, is_same, is_loading, className, can_edit, onDelete, modalShowPhotoswipe, ...props }) => { return (
{comment_group.comments.map(comment => { if (comment.deleted_at) { return ; } return ( ); })}
); } ); export { Comment };