From c7eeb104b4e05a58aeebd09df1454398a112a48c Mon Sep 17 00:00:00 2001 From: fantasticit Date: Fri, 3 Jun 2022 21:57:17 +0800 Subject: [PATCH] client: fix comment to login --- packages/client/src/components/document/comments/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/client/src/components/document/comments/index.tsx b/packages/client/src/components/document/comments/index.tsx index f93c2f6..5fcd67a 100644 --- a/packages/client/src/components/document/comments/index.tsx +++ b/packages/client/src/components/document/comments/index.tsx @@ -17,7 +17,7 @@ interface IProps { const { Text, Paragraph } = Typography; export const CommentEditor: React.FC = ({ documentId }) => { - const { user, logout } = useUser(); + const { user, toLogin } = useUser(); const { data: commentsData, loading, @@ -39,11 +39,11 @@ export const CommentEditor: React.FC = ({ documentId }) => { const openEditor = useCallback(() => { if (!user) { - return logout(); + return toLogin(); } toggleIsEdit(true); editor.chain().focus(); - }, [editor, logout, toggleIsEdit, user]); + }, [editor, toLogin, toggleIsEdit, user]); const handleClose = useCallback(() => { setReplyComment(null);