mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
refactor(toast): migrate dataset-pipeline to new ui toast API and extract i18n (#33794)
This commit is contained in:
@ -8,7 +8,7 @@ import { useAppForm } from '@/app/components/base/form'
|
||||
import BaseField from '@/app/components/base/form/form-scenarios/base/field'
|
||||
import { generateZodSchema } from '@/app/components/base/form/form-scenarios/base/utils'
|
||||
import { ArrowDownRoundFill } from '@/app/components/base/icons/src/vender/solid/general'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
import { toast } from '@/app/components/base/ui/toast'
|
||||
import { useConfigurations, useInitialData } from '@/app/components/rag-pipeline/hooks/use-input-fields'
|
||||
import { CrawlStep } from '@/models/datasets'
|
||||
import { cn } from '@/utils/classnames'
|
||||
@ -44,9 +44,9 @@ const Options = ({
|
||||
const issues = result.error.issues
|
||||
const firstIssue = issues[0]
|
||||
const errorMessage = `"${firstIssue.path.join('.')}" ${firstIssue.message}`
|
||||
Toast.notify({
|
||||
toast.add({
|
||||
type: 'error',
|
||||
message: errorMessage,
|
||||
title: errorMessage,
|
||||
})
|
||||
return errorMessage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user