mirror of
https://github.com/fantasticit/think.git
synced 2026-10-29 19:22:38 +08:00
client: fix comment to login
This commit is contained in:
@@ -17,7 +17,7 @@ interface IProps {
|
||||
const { Text, Paragraph } = Typography;
|
||||
|
||||
export const CommentEditor: React.FC<IProps> = ({ documentId }) => {
|
||||
const { user, logout } = useUser();
|
||||
const { user, toLogin } = useUser();
|
||||
const {
|
||||
data: commentsData,
|
||||
loading,
|
||||
@@ -39,11 +39,11 @@ export const CommentEditor: React.FC<IProps> = ({ 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);
|
||||
|
||||
Reference in New Issue
Block a user