mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed comment attachments click
This commit is contained in:
parent
6957813cd0
commit
dd8b4e9dcf
2 changed files with 10 additions and 6 deletions
|
@ -69,6 +69,12 @@ const CommentContent: FC<IProps> = memo(
|
|||
onDelete(comment.id, !comment.deleted_at);
|
||||
}, [comment, onDelete]);
|
||||
|
||||
const onImageClick = useCallback(
|
||||
(file: IFile) =>
|
||||
onShowImageModal(groupped.image, groupped.image.indexOf(file)),
|
||||
[onShowImageModal, groupped],
|
||||
);
|
||||
|
||||
const menu = useMemo(
|
||||
() => (
|
||||
<div>
|
||||
|
@ -130,7 +136,7 @@ const CommentContent: FC<IProps> = memo(
|
|||
<div className={classnames(styles.block, styles.block_image)}>
|
||||
{menu}
|
||||
|
||||
<CommentImageGrid files={groupped.image} />
|
||||
<CommentImageGrid files={groupped.image} onClick={onImageClick} />
|
||||
|
||||
<div className={styles.date}>
|
||||
{getPrettyDate(comment.created_at)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue