Added translation to payments
All checks were successful
Build frontend / build (push) Successful in 1m43s

This commit is contained in:
Rahaf
2026-07-02 10:38:55 +03:00
parent dab5b62fb7
commit c7698741c7
3 changed files with 68 additions and 49 deletions

View File

@ -153,8 +153,21 @@ export default function LoginPage() {
}
setStep("otp");
} else if (result.status >= 500) {
console.error("[Login] Server error:", result.status, result.data);
toast.error(t("serverError"), {
style: { background: "#fee2e2", color: "#991b1b" },
});
} else if (result.status === 404) {
console.error("[Login] API endpoint not found:", result.status);
toast.error(t("apiNotFound"), {
style: { background: "#fee2e2", color: "#991b1b" },
});
} else if (result.status === 429) {
toast.error(t("tooManyRequests"), {
style: { background: "#fee2e2", color: "#991b1b" },
});
} else {
// Other error
console.error("[Login] Unexpected status:", result.status, result.data);
toast.error(
result.data?.message || result.data || t("invalidCredentials"),