refactor(toast): migrate dataset-pipeline to new ui toast API and extract i18n (#33794)

This commit is contained in:
yyh
2026-03-20 12:17:27 +08:00
committed by GitHub
parent a0135e9e38
commit aa71784627
10 changed files with 36 additions and 56 deletions

View File

@ -3,7 +3,7 @@ import type { BaseConfiguration } from '@/app/components/base/form/form-scenario
import { useCallback, useImperativeHandle } from 'react'
import { useAppForm } from '@/app/components/base/form'
import BaseField from '@/app/components/base/form/form-scenarios/base/field'
import Toast from '@/app/components/base/toast'
import { toast } from '@/app/components/base/ui/toast'
import Header from './header'
type OptionsProps = {
@ -34,9 +34,9 @@ const Form = ({
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
}