mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
refactor(web): migrate auth toast calls to ui toast (#33744)
This commit is contained in:
@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import { trackEvent } from '@/app/components/base/amplitude'
|
||||
import Button from '@/app/components/base/button'
|
||||
import Input from '@/app/components/base/input'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
import { toast } from '@/app/components/base/ui/toast'
|
||||
import { validPassword } from '@/config'
|
||||
import { useRouter, useSearchParams } from '@/next/navigation'
|
||||
import { useMailRegister } from '@/service/use-common'
|
||||
@ -37,9 +37,9 @@ const ChangePasswordForm = () => {
|
||||
const { mutateAsync: register, isPending } = useMailRegister()
|
||||
|
||||
const showErrorMessage = useCallback((message: string) => {
|
||||
Toast.notify({
|
||||
toast.add({
|
||||
type: 'error',
|
||||
message,
|
||||
title: message,
|
||||
})
|
||||
}, [])
|
||||
|
||||
@ -82,9 +82,9 @@ const ChangePasswordForm = () => {
|
||||
})
|
||||
Cookies.remove('utm_info') // Clean up: remove utm_info cookie
|
||||
|
||||
Toast.notify({
|
||||
toast.add({
|
||||
type: 'success',
|
||||
message: t('api.actionSuccess', { ns: 'common' }),
|
||||
title: t('api.actionSuccess', { ns: 'common' }),
|
||||
})
|
||||
router.replace('/apps')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user