diff --git a/components/register/verificationPage/SendReq.js b/components/register/verificationPage/SendReq.js index b75c301..d384c76 100644 --- a/components/register/verificationPage/SendReq.js +++ b/components/register/verificationPage/SendReq.js @@ -1,6 +1,7 @@ import { Button, CircularProgress } from "@mui/material"; import { request } from "@/services/response"; import Cookies from "js-cookie"; +import { toast } from "react-toastify"; import { handleTimeExpiresToken } from "@/helper"; function SendReq({ @@ -26,10 +27,13 @@ function SendReq({ } else { setLoading(false); setIsError(true); + const message = response?.errors?.[0]?.message || "کد تأیید نادرست یا منقضی شده است."; + toast.error(message); } } catch { setLoading(false); setIsError(true); + toast.error("خطا در برقراری ارتباط. دوباره تلاش کنید."); } };