dify/web/app/components/workflow/block-selector/utils.ts

7 lines
186 B
TypeScript

import type { BlockEnum } from '../types'
import { BLOCKS } from './constants'
export const getBlockByType = (type: BlockEnum) => {
return BLOCKS.find(block => block.type === type)
}