Chore/slice workflow utils (#17730)
This commit is contained in:
parent
9d5a0fdd8a
commit
30f7118c7a
19 changed files with 1215 additions and 1081 deletions
|
|
@ -1,11 +1,5 @@
|
|||
import { useLanguage } from '@/app/components/header/account-setting/model-provider-page/hooks'
|
||||
|
||||
export const renderI18nObject = (obj: Record<string, string>, language: string) => {
|
||||
if (!obj) return ''
|
||||
if (obj?.[language]) return obj[language]
|
||||
if (obj?.en_US) return obj.en_US
|
||||
return Object.values(obj)[0]
|
||||
}
|
||||
import { renderI18nObject } from '@/i18n'
|
||||
|
||||
export const useRenderI18nObject = () => {
|
||||
const language = useLanguage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue