mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
store
This commit is contained in:
@ -2,52 +2,13 @@
|
||||
|
||||
import { memo } from 'react'
|
||||
import Workflow from '@/app/components/workflow'
|
||||
|
||||
// export function createNodesAndEdges(xNodes = 10, yNodes = 10) {
|
||||
// const nodes = []
|
||||
// const edges = []
|
||||
// let nodeId = 1
|
||||
// let recentNodeId = null
|
||||
|
||||
// for (let y = 0; y < yNodes; y++) {
|
||||
// for (let x = 0; x < xNodes; x++) {
|
||||
// const position = { x: x * 200, y: y * 50 }
|
||||
// const node = {
|
||||
// id: `stress-${nodeId.toString()}`,
|
||||
// type: 'custom',
|
||||
// data: { type: 'start', title: '开始', variables: [] },
|
||||
// position,
|
||||
// }
|
||||
// nodes.push(node)
|
||||
|
||||
// if (recentNodeId && nodeId <= xNodes * yNodes) {
|
||||
// edges.push({
|
||||
// id: `${x}-${y}`,
|
||||
// type: 'custom',
|
||||
// source: `stress-${recentNodeId.toString()}`,
|
||||
// target: `stress-${nodeId.toString()}`,
|
||||
// })
|
||||
// }
|
||||
|
||||
// recentNodeId = nodeId
|
||||
// nodeId++
|
||||
// }
|
||||
// }
|
||||
|
||||
// return { nodes, edges }
|
||||
// }
|
||||
import { useStore } from '@/app/components/app/store'
|
||||
|
||||
const Page = () => {
|
||||
// const {
|
||||
// nodes,
|
||||
// edges,
|
||||
// } = createNodesAndEdges()
|
||||
const appDetail = useStore(s => s.appDetail)!
|
||||
return (
|
||||
<div className='w-full h-full overflow-x-auto'>
|
||||
<Workflow
|
||||
// nodes={nodes}
|
||||
// edges={edges}
|
||||
/>
|
||||
<div className='w-full h-full overflow-x-auto' key={appDetail.id}>
|
||||
<Workflow />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user