fix: model selector language undefined error (#23723)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import type { FC } from 'react'
|
import type { FC } from 'react'
|
||||||
import { useEffect, useRef, useState } from 'react'
|
import { useEffect, useRef, useState } from 'react'
|
||||||
import type { ModelParameterRule } from '../declarations'
|
import type { ModelParameterRule } from '../declarations'
|
||||||
|
import { useLanguage } from '../hooks'
|
||||||
import { isNullOrUndefined } from '../utils'
|
import { isNullOrUndefined } from '../utils'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import Switch from '@/app/components/base/switch'
|
import Switch from '@/app/components/base/switch'
|
||||||
@@ -26,6 +27,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||||||
onSwitch,
|
onSwitch,
|
||||||
isInWorkflow,
|
isInWorkflow,
|
||||||
}) => {
|
}) => {
|
||||||
|
const language = useLanguage()
|
||||||
const [localValue, setLocalValue] = useState(value)
|
const [localValue, setLocalValue] = useState(value)
|
||||||
const numberInputRef = useRef<HTMLInputElement>(null)
|
const numberInputRef = useRef<HTMLInputElement>(null)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user