This commit is contained in:
StyleZhang
2024-03-05 11:57:51 +08:00
parent a30b6acc52
commit 90c8d9d27b
5 changed files with 76 additions and 13 deletions

View File

@ -0,0 +1,13 @@
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}`),
}
})
}