1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46: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']) => { (fileId: IFile['id']) => {
nodeSetCommentData( nodeSetCommentData(
id, 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] [comment_data, id, nodeSetCommentData]
@ -189,13 +193,17 @@ const CommentFormUnconnected: FC<IProps> = memo(
['files'], ['files'],
[ [
...audios, ...audios,
...(moveArrItem(oldIndex, newIndex, images.filter(file => !!file)) as IFile[]), ...(moveArrItem(
oldIndex,
newIndex,
images.filter(file => !!file)
) as IFile[]),
], ],
comment_data[id] comment_data[id]
) )
); );
}, },
[images, audios] [images, audios, comment_data, nodeSetCommentData]
); );
const onAudioMove = useCallback( const onAudioMove = useCallback(
@ -206,13 +214,17 @@ const CommentFormUnconnected: FC<IProps> = memo(
['files'], ['files'],
[ [
...images, ...images,
...(moveArrItem(oldIndex, newIndex, audios.filter(file => !!file)) as IFile[]), ...(moveArrItem(
oldIndex,
newIndex,
audios.filter(file => !!file)
) as IFile[]),
], ],
comment_data[id] comment_data[id]
) )
); );
}, },
[images, audios] [images, audios, comment_data, nodeSetCommentData]
); );
const onCancelEdit = useCallback(() => { const onCancelEdit = useCallback(() => {
@ -299,9 +311,6 @@ const CommentFormUnconnected: FC<IProps> = memo(
} }
); );
const CommentForm = connect( const CommentForm = connect(mapStateToProps, mapDispatchToProps)(CommentFormUnconnected);
mapStateToProps,
mapDispatchToProps
)(CommentFormUnconnected);
export { CommentForm, CommentFormUnconnected }; export { CommentForm, CommentFormUnconnected };