mirror of
https://github.com/langgenius/dify.git
synced 2026-03-21 10:30:11 +08:00
14 lines
276 B
TypeScript
14 lines
276 B
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { BLOCKS } from './constants'
|
|
|
|
export const useBlocks = () => {
|
|
const { t } = useTranslation()
|
|
|
|
return BLOCKS.map((block) => {
|
|
return {
|
|
...block,
|
|
title: t(`workflow.blocks.${block.type}`),
|
|
}
|
|
})
|
|
}
|