diff --git a/web/app/components/workflow/comment/cursor.tsx b/web/app/components/workflow/comment/cursor.tsx index aafd2a4fb9..56b5c24f16 100644 --- a/web/app/components/workflow/comment/cursor.tsx +++ b/web/app/components/workflow/comment/cursor.tsx @@ -4,12 +4,9 @@ import { useStore } from '../store' import { ControlMode } from '../types' import { Comment } from '@/app/components/base/icons/src/public/other' -type CommentCursorProps = { - mousePosition: { elementX: number; elementY: number } -} - -export const CommentCursor: FC = memo(({ mousePosition }) => { +export const CommentCursor: FC = memo(() => { const controlMode = useStore(s => s.controlMode) + const mousePosition = useStore(s => s.mousePosition) if (controlMode !== ControlMode.Comment) return null diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx index d1b026a0d6..7df1de179c 100644 --- a/web/app/components/workflow/index.tsx +++ b/web/app/components/workflow/index.tsx @@ -202,7 +202,6 @@ export const Workflow: FC = memo(({ } = useWorkflowComment() const showUserComments = useStore(s => s.showUserComments) const showUserCursors = useStore(s => s.showUserCursors) - const mousePosition = useStore(s => s.mousePosition) const { t } = useTranslation() eventEmitter?.useSubscription((v: any) => { @@ -442,7 +441,7 @@ export const Workflow: FC = memo(({ )} {controlMode === ControlMode.Comment && isMouseOverCanvas && ( - + )} {pendingComment && (