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

add comments for guests

This commit is contained in:
Fedor Katurov 2023-10-30 15:16:19 +06:00
parent cbf7b1f616
commit 8abf6177b5
16 changed files with 278 additions and 194 deletions

View file

@ -22,6 +22,7 @@ import { IComment, IFile } from '~/types';
import { formatCommentText, getPrettyDate, getURL } from '~/utils/dom';
import { append, assocPath, path, reduce } from '~/utils/ramda';
import { CommentEditingForm } from '../CommentEditingForm';
import { CommentImageGrid } from '../CommentImageGrid';
import { CommentMenu } from '../CommentMenu';
@ -32,7 +33,7 @@ interface IProps {
nodeId: number;
comment: IComment;
canEdit: boolean;
saveComment: (data: IComment) => Promise<unknown>;
saveComment: (data: IComment) => Promise<IComment | undefined>;
onDelete: (id: IComment['id'], isLocked: boolean) => void;
onShowImageModal: (images: IFile[], index: number) => void;
}
@ -98,7 +99,7 @@ const CommentContent: FC<IProps> = memo(
if (isEditing) {
return (
<CommentForm
<CommentEditingForm
saveComment={saveComment}
nodeId={nodeId}
comment={comment}