mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
style: minimium codemod
This commit is contained in:
parent
764daf0040
commit
9edd0a6eae
|
@ -44,7 +44,7 @@ const Flowchart = React.forwardRef((props: {
|
|||
const chartId = useRef(`flowchart_${CryptoJS.MD5(props.PrimitiveCode).toString()}`)
|
||||
const prevPrimitiveCode = usePrevious(props.PrimitiveCode)
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
const timeRef = useRef<NodeJS.Timeout>()
|
||||
const timeRef = useRef<number>()
|
||||
const [errMsg, setErrMsg] = useState('')
|
||||
|
||||
const renderFlowchart = async (PrimitiveCode: string) => {
|
||||
|
@ -74,9 +74,9 @@ const Flowchart = React.forwardRef((props: {
|
|||
return
|
||||
}
|
||||
if (timeRef.current)
|
||||
clearTimeout(timeRef.current)
|
||||
window.clearTimeout(timeRef.current)
|
||||
|
||||
timeRef.current = setTimeout(() => {
|
||||
timeRef.current = window.setTimeout(() => {
|
||||
renderFlowchart(props.PrimitiveCode)
|
||||
}, 300)
|
||||
}, [props.PrimitiveCode])
|
||||
|
|
|
@ -34,15 +34,15 @@ export default function CustomPopover({
|
|||
disabled = false,
|
||||
}: IPopover) {
|
||||
const buttonRef = useRef<HTMLButtonElement>(null)
|
||||
const timeOutRef = useRef<NodeJS.Timeout | null>(null)
|
||||
const timeOutRef = useRef<number | null>(null)
|
||||
|
||||
const onMouseEnter = (isOpen: boolean) => {
|
||||
timeOutRef.current && clearTimeout(timeOutRef.current)
|
||||
timeOutRef.current && window.clearTimeout(timeOutRef.current)
|
||||
!isOpen && buttonRef.current?.click()
|
||||
}
|
||||
|
||||
const onMouseLeave = (isOpen: boolean) => {
|
||||
timeOutRef.current = setTimeout(() => {
|
||||
timeOutRef.current = window.setTimeout(() => {
|
||||
isOpen && buttonRef.current?.click()
|
||||
}, timeoutDuration)
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ const RuleDetail: FC<{ sourceData?: ProcessRuleResponse }> = ({ sourceData }) =>
|
|||
default:
|
||||
value = sourceData?.mode === 'automatic'
|
||||
? (t('datasetDocuments.embedding.automatic') as string)
|
||||
// eslint-disable-next-line array-callback-return
|
||||
: sourceData?.rules?.pre_processing_rules?.map((rule) => {
|
||||
if (rule.enabled)
|
||||
return getRuleName(rule.id)
|
||||
|
|
|
@ -85,6 +85,7 @@ const RuleDetail: FC<{ sourceData?: ProcessRuleResponse; docName?: string }> = (
|
|||
default:
|
||||
value = sourceData?.mode === 'automatic'
|
||||
? (t('datasetDocuments.embedding.automatic') as string)
|
||||
// eslint-disable-next-line array-callback-return
|
||||
: sourceData?.rules?.pre_processing_rules?.map((rule) => {
|
||||
if (rule.enabled)
|
||||
return getRuleName(rule.id)
|
||||
|
|
|
@ -3,6 +3,8 @@ const translation = {
|
|||
welcome: 'आपका स्वागत है',
|
||||
appUnavailable: 'ऐप उपलब्ध नहीं है',
|
||||
appUnknownError: 'अज्ञात त्रुटि, कृपया पुनः प्रयास करें',
|
||||
// @ts-expect-error TODO: fix this
|
||||
// eslint-disable-next-line no-dupe-keys
|
||||
appUnknownError: 'ऐप अनुपलब्ध है',
|
||||
},
|
||||
chat: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user