Compare commits

...

1 Commits

Author SHA1 Message Date
yyh
42a0545a09 refactor(web): simplify the scroll-to-node action
Remove the React.FC annotation without changing the component DOM, behavior, styles, tests, or existing accessibility suppressions.
2026-08-09 12:22:47 +08:00

View File

@@ -1,11 +1,10 @@
import type { FC } from 'react'
import type { CommonNodeType } from '../types'
import { cn } from '@langgenius/dify-ui/cn'
import { useTranslation } from 'react-i18next'
import { useNodes } from 'reactflow'
import { scrollToWorkflowNode } from '../utils/node-navigation'
const ScrollToSelectedNodeButton: FC = () => {
const ScrollToSelectedNodeButton = () => {
const { t } = useTranslation()
const nodes = useNodes<CommonNodeType>()
const selectedNode = nodes.find((node) => node.data.selected)