mirror of
https://github.com/langgenius/dify.git
synced 2026-04-27 02:36:29 +08:00
18 lines
456 B
TypeScript
18 lines
456 B
TypeScript
import useNodeCrud from '../_base/hooks/use-node-crud'
|
|
import type { HumanInputNodeType } from './types'
|
|
|
|
const useFormContent = (id: string, payload: HumanInputNodeType) => {
|
|
const { inputs, setInputs } = useNodeCrud<HumanInputNodeType>(id, payload)
|
|
const handleFormContentChange = (value: string) => {
|
|
setInputs({
|
|
...inputs,
|
|
form_content: value,
|
|
})
|
|
}
|
|
return {
|
|
handleFormContentChange,
|
|
}
|
|
}
|
|
|
|
export default useFormContent
|