From 8e728391f2d01c4a258105fc67b804df968f5ecd Mon Sep 17 00:00:00 2001 From: fantasticit Date: Fri, 17 Jun 2022 22:58:40 +0800 Subject: [PATCH] client: fix navigate after delete document --- packages/client/src/components/document/delete/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/document/delete/index.tsx b/packages/client/src/components/document/delete/index.tsx index b177ffb..3fb1e90 100644 --- a/packages/client/src/components/document/delete/index.tsx +++ b/packages/client/src/components/document/delete/index.tsx @@ -30,7 +30,8 @@ export const DocumentDeletor: React.FC = ({ wikiId, documentId, render, }); }; - onDelete ? onDelete() : navigate(); + navigate(); + onDelete && onDelete(); }); }, [wikiId, documentId, api, onDelete, currentWikiId, currentDocumentId]);