fix(ui): remove invalid MUI v5 Button loading prop project-wide

prop loading روی Button فقط در MUI v6+ پشتیبانی می‌شود؛ این پروژه v5 است
و هشدار "Received false for a non-boolean attribute loading" می‌داد.
- دکمه‌های login/verify: disabled + CircularProgress شرطی (بازخورد بصری حفظ شد)
- بقیه دکمه‌ها: loading → disabled (ادغام با disabled موجود در صورت وجود)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
hamed
2026-06-15 00:30:55 +03:30
co-authored by Claude Opus 4.8
parent ecc212db86
commit 8255283ec0
16 changed files with 19 additions and 21 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import Field from "@/app/component/element/Field";
import { validatePhoneNumber } from "@/helper";
import { request } from "@/services/response";
import { InputAdornment, Button } from "@mui/material";
import { InputAdornment, Button, CircularProgress } from "@mui/material";
import Link from "next/link";
import { useState } from "react";
import { toast } from "react-toastify";
@@ -72,7 +72,7 @@ function LogInPage({ setIsSendMsg, num, setNum, setUuid, matchedCity, setStep })
<Button
fullWidth
variant="contained"
loading={loading}
disabled={loading}
onClick={() => {
const checkedNum = validatePhoneNumber(num);
if (!checkedNum.valid) {
@@ -83,7 +83,7 @@ function LogInPage({ setIsSendMsg, num, setNum, setUuid, matchedCity, setStep })
}}
className="!rounded-[8px] !bg-[#5559CE] !py-[7.5px] md:!py-[8.5px] lg:!py-[10px]"
>
ورود
{loading ? <CircularProgress size={22} sx={{ color: "#fff" }} /> : "ورود"}
</Button>
<p className="text-[#525252] text-[14px] font-normal text-center mt-[34px] sm:mt-[36px] md:mt-[38px] lg:mt-[40px]">
<Link href="/">
@@ -1,4 +1,4 @@
import { Button } from "@mui/material";
import { Button, CircularProgress } from "@mui/material";
import { request } from "@/services/response";
import Cookies from "js-cookie";
import { handleTimeExpiresToken } from "@/helper";
@@ -112,7 +112,7 @@ function SendReq({
}}
className="!rounded-[8px] !bg-[#5559CE]"
>
تایید
{loading ? <CircularProgress size={22} sx={{ color: "#fff" }} /> : "تایید"}
</Button>
);
}