This commit is contained in:
@@ -8,7 +8,7 @@ import DefaulModal from '../../../components/DefaulModal'
|
||||
import OTPInput from 'react-otp-input'
|
||||
import { useUpdateEmail } from '../hooks/useProfileData'
|
||||
import { ErrorType } from '../../../helpers/types'
|
||||
import { toast } from 'react-toastify'
|
||||
import { toast } from '../../../components/Toast';
|
||||
|
||||
type Props = {
|
||||
email: string | null,
|
||||
@@ -27,10 +27,10 @@ const Email: FC<Props> = (props: Props) => {
|
||||
const handleShowModal = () => {
|
||||
updateEmail.mutate({ email: email }, {
|
||||
onSuccess: () => {
|
||||
toast.success(t('profile.link_email'))
|
||||
toast(t('profile.link_email'), 'success')
|
||||
},
|
||||
onError: (error: ErrorType) => {
|
||||
toast.error(error.response?.data?.error.message[0])
|
||||
toast(error.response?.data?.error.message[0], 'error')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user