mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
feature: added image preview for comments
This commit is contained in:
parent
08f6b518e4
commit
7d3132237d
5 changed files with 80 additions and 63 deletions
|
@ -7,6 +7,7 @@ import { nodeLockComment, nodeEditComment } from '~/redux/node/actions';
|
|||
import { INodeState } from '~/redux/node/reducer';
|
||||
import { CommentForm } from '../CommentForm';
|
||||
import { CommendDeleted } from '../CommendDeleted';
|
||||
import * as MODAL_ACTIONS from '~/redux/modal/actions';
|
||||
|
||||
type IProps = HTMLAttributes<HTMLDivElement> & {
|
||||
is_empty?: boolean;
|
||||
|
@ -17,6 +18,7 @@ type IProps = HTMLAttributes<HTMLDivElement> & {
|
|||
can_edit?: boolean;
|
||||
onDelete: typeof nodeLockComment;
|
||||
onEdit: typeof nodeEditComment;
|
||||
modalShowPhotoswipe: typeof MODAL_ACTIONS.modalShowPhotoswipe;
|
||||
};
|
||||
|
||||
const Comment: FC<IProps> = memo(
|
||||
|
@ -30,6 +32,7 @@ const Comment: FC<IProps> = memo(
|
|||
can_edit,
|
||||
onDelete,
|
||||
onEdit,
|
||||
modalShowPhotoswipe,
|
||||
...props
|
||||
}) => {
|
||||
return (
|
||||
|
@ -58,6 +61,7 @@ const Comment: FC<IProps> = memo(
|
|||
can_edit={can_edit}
|
||||
onDelete={onDelete}
|
||||
onEdit={onEdit}
|
||||
modalShowPhotoswipe={modalShowPhotoswipe}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue