This commit is contained in:
StyleZhang 2024-03-27 17:35:56 +08:00
parent 9e4b39e19f
commit d239e6bf0f
3 changed files with 10 additions and 4 deletions

View File

@ -2,12 +2,10 @@
import { memo } from 'react'
import Workflow from '@/app/components/workflow'
import { useStore } from '@/app/components/app/store'
const Page = () => {
const appDetail = useStore(s => s.appDetail)!
return (
<div className='w-full h-full overflow-x-auto' key={appDetail.id}>
<div className='w-full h-full overflow-x-auto'>
<Workflow />
</div>
)

View File

@ -1,3 +1,5 @@
'use client'
import type { FC } from 'react'
import {
memo,
@ -76,6 +78,12 @@ const Workflow: FC<WorkflowProps> = memo(({
}
}, [])
useEffect(() => {
return () => {
handleSyncWorkflowDraft(true)
}
}, [handleSyncWorkflowDraft])
const {
handleNodeDragStart,
handleNodeDrag,

View File

@ -35,7 +35,7 @@ const InputsPanel = () => {
const variables = useMemo(() => {
const data = startVariables || []
if (fileSettings.image.enabled) {
if (fileSettings?.image.enabled) {
return [
...data,
{