From 0197c8b2f45b923746d66067963d7c72f5ae7f64 Mon Sep 17 00:00:00 2001 From: HouKunLin Date: Wed, 17 May 2023 09:10:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=A0=E9=99=A4=E6=AD=8C=E6=9B=B2?= =?UTF-8?q?=E8=A1=8C=E6=95=B0=E6=8D=AE=E6=97=B6=E6=94=B9=E7=94=A8=20onClos?= =?UTF-8?q?e=20=E6=9D=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/features/file-listing/FileRow.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/features/file-listing/FileRow.tsx b/src/features/file-listing/FileRow.tsx index 9cdc12d..2efe8d3 100644 --- a/src/features/file-listing/FileRow.tsx +++ b/src/features/file-listing/FileRow.tsx @@ -25,7 +25,7 @@ interface FileRowProps { } export function FileRow({ id, file }: FileRowProps) { - const { isOpen, onToggle } = useDisclosure({ defaultIsOpen: true }); + const { isOpen, onClose } = useDisclosure({ defaultIsOpen: true }); const dispatch = useAppDispatch(); const isDecrypted = file.state === ProcessState.COMPLETE; @@ -47,11 +47,11 @@ export function FileRow({ id, file }: FileRowProps) { }, []); const handleDeleteRow = useCallback(() => { - onToggle(); + onClose(); setTimeout(() => { dispatch(deleteFile({ id })); }, 500); - }, [dispatch, id, onToggle]); + }, [dispatch, id, onClose]); return (