1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

comment undelete

This commit is contained in:
Fedor Katurov 2019-12-03 16:06:43 +07:00
parent 45d6e9a052
commit ba6b0bfe98
6 changed files with 50 additions and 6 deletions

View file

@ -6,6 +6,7 @@ import * as styles from './styles.scss';
import { nodeLockComment, nodeEditComment } from '~/redux/node/actions';
import { INodeState } from '~/redux/node/reducer';
import { CommentForm } from '../CommentForm';
import { CommendDeleted } from '../CommendDeleted';
type IProps = HTMLAttributes<HTMLDivElement> & {
is_empty?: boolean;
@ -43,7 +44,7 @@ const Comment: FC<IProps> = memo(
<div className={styles.wrap}>
{comment_group.comments.map(comment => {
if (comment.deleted_at) {
return <div key={comment.id}>deleted</div>;
return <CommendDeleted id={comment.id} onDelete={onDelete} key={comment.id} />;
}
if (Object.prototype.hasOwnProperty.call(comment_data, comment.id)) {