change toast
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-07-20 10:55:33 +03:30
parent feed194673
commit d3fd21177b
97 changed files with 437 additions and 411 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import Error from '../../../components/Error'
import Button from '../../../components/Button'
import { isEmail } from '../../../config/func'
import { useCheckHasAccount, useLoginWithOtp } from '../hooks/useAuthData'
import { toast } from 'react-toastify'
import { toast } from '../../../components/Toast';
import { ErrorType } from '../../../helpers/types'
const LoginStep1: FC = () => {
@@ -35,7 +35,7 @@ const LoginStep1: FC = () => {
setStepLogin(2)
},
onError(error: ErrorType) {
toast.error(error?.response?.data?.error?.message[0])
toast(error?.response?.data?.error?.message[0], 'error')
},
})
} else {
@@ -43,10 +43,10 @@ const LoginStep1: FC = () => {
loginWithOtp.mutate({ phone: values.phone_email }, {
onSuccess() {
setStepLogin(2)
toast.success(t('auth.otp_sent'))
toast(t('auth.otp_sent'), 'success')
},
onError(error: ErrorType) {
toast.error(error?.response?.data?.error?.message[0])
toast(error?.response?.data?.error?.message[0], 'error')
},
})
}