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:
parent
cbf7b1f616
commit
8abf6177b5
16 changed files with 278 additions and 194 deletions
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue