1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

refactored comment form

This commit is contained in:
Fedor Katurov 2020-11-09 17:55:00 +07:00
parent af9b206a78
commit 9db25afb28
19 changed files with 235 additions and 153 deletions

View file

@ -16,7 +16,13 @@ interface IProps {
const AudioGrid: FC<IProps> = ({ files, setFiles, locked }) => {
const onMove = useCallback(
({ oldIndex, newIndex }: SortEnd) => {
setFiles(moveArrItem(oldIndex, newIndex, files.filter(file => !!file)) as IFile[]);
setFiles(
moveArrItem(
oldIndex,
newIndex,
files.filter(file => !!file)
) as IFile[]
);
},
[setFiles, files]
);
@ -41,7 +47,7 @@ const AudioGrid: FC<IProps> = ({ files, setFiles, locked }) => {
return (
<SortableAudioGrid
onDrop={onDrop}
onDelete={onDrop}
onTitleChange={onTitleChange}
onSortEnd={onMove}
axis="xy"