fix(home): clear textarea value when a file is uploaded

This commit is contained in:
Pavel Torbeev 2023-09-09 01:39:07 +03:00
parent acaf7d0b5e
commit 89d6b794bb

View File

@ -90,6 +90,7 @@ export const HomePage: ReactFCC = () => {
const onDrop = useCallback( const onDrop = useCallback(
(acceptedFiles: File[]) => { (acceptedFiles: File[]) => {
setValue('text', '');
setValue('files', [...currentFiles, ...acceptedFiles]); setValue('files', [...currentFiles, ...acceptedFiles]);
}, },
[currentFiles, setValue] [currentFiles, setValue]