1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fixed dependencies

This commit is contained in:
Fedor Katurov 2020-06-25 17:28:05 +07:00
parent ac2411d67a
commit 1a0d580e47

View file

@ -159,7 +159,11 @@ const CommentFormUnconnected: FC<IProps> = memo(
(fileId: IFile['id']) => {
nodeSetCommentData(
id,
assocPath(['files'], comment.files.filter(file => file.id != fileId), comment_data[id])
assocPath(
['files'],
comment.files.filter(file => file.id != fileId),
comment_data[id]
)
);
},
[comment_data, id, nodeSetCommentData]
@ -189,13 +193,17 @@ const CommentFormUnconnected: FC<IProps> = memo(
['files'],
[
...audios,
...(moveArrItem(oldIndex, newIndex, images.filter(file => !!file)) as IFile[]),
...(moveArrItem(
oldIndex,
newIndex,
images.filter(file => !!file)
) as IFile[]),
],
comment_data[id]
)
);
},
[images, audios]
[images, audios, comment_data, nodeSetCommentData]
);
const onAudioMove = useCallback(
@ -206,13 +214,17 @@ const CommentFormUnconnected: FC<IProps> = memo(
['files'],
[
...images,
...(moveArrItem(oldIndex, newIndex, audios.filter(file => !!file)) as IFile[]),
...(moveArrItem(
oldIndex,
newIndex,
audios.filter(file => !!file)
) as IFile[]),
],
comment_data[id]
)
);
},
[images, audios]
[images, audios, comment_data, nodeSetCommentData]
);
const onCancelEdit = useCallback(() => {
@ -299,9 +311,6 @@ const CommentFormUnconnected: FC<IProps> = memo(
}
);
const CommentForm = connect(
mapStateToProps,
mapDispatchToProps
)(CommentFormUnconnected);
const CommentForm = connect(mapStateToProps, mapDispatchToProps)(CommentFormUnconnected);
export { CommentForm, CommentFormUnconnected };