refactor(web): migrate auth toast calls to ui toast (#33744)

This commit is contained in:
yyh
2026-03-19 16:15:07 +08:00
committed by GitHub
parent a2c4345c00
commit ef9803f8b9
21 changed files with 95 additions and 162 deletions

View File

@ -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')
}