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:
@@ -98,7 +98,7 @@ function ItemDoctor({ doctor, loading, setDoctors, priority = false }) {
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={handleLoading}
|
||||
loading={doctor?.loading}
|
||||
disabled={doctor?.loading}
|
||||
className="!p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit"
|
||||
>
|
||||
<div className={doctor && doctor.loading ? "opacity-0" : ""}>
|
||||
|
||||
@@ -42,7 +42,7 @@ function ModalLogout({ open, handleClose }) {
|
||||
</Button>
|
||||
<Button
|
||||
onClick={logout}
|
||||
loading={loading}
|
||||
disabled={loading}
|
||||
variant="contained"
|
||||
className="!py-[4px] md:!py-[6px] !min-h-[32px] md:!min-h-[39px] lg:!min-h-[46px] lg:!py-[8px] !px-[10px] md:!px-[14px] lg:!px-[18px] !rounded-[4px] !text-[12px] md:!text-[14px] lg:!text-[16px] !font-medium"
|
||||
>
|
||||
|
||||
@@ -50,7 +50,7 @@ function SendAnswer({ data }) {
|
||||
updateValue={(val) => setComment(val)}
|
||||
/>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={loading}
|
||||
onClick={sendReq}
|
||||
variant="contained"
|
||||
className="!p-2 !h-10 !text-[12px] !font-medium sm:!py-[10px] md:!px-[12px] !rounded-[8px]
|
||||
|
||||
@@ -45,7 +45,7 @@ function SendAppo({ hour, setStep, setSelectedSlot, date, setSelectedDate }) {
|
||||
<Button
|
||||
className="!gap-[4px] !text-[16px] !font-medium !shadow-none !px-[12px] !py-[8px] md:!py-[9px] !w-full md:!w-fit !min-w-[157px]"
|
||||
variant="contained"
|
||||
loading={loading}
|
||||
disabled={loading}
|
||||
onClick={sendReq}
|
||||
disabled={!hour}
|
||||
>
|
||||
|
||||
@@ -74,7 +74,7 @@ function Content({
|
||||
</div>
|
||||
<div className="w-full flex justify-end">
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={loading}
|
||||
className="!w-full md:!w-fit !flex !px-3 items-center justify-center gap-1 mr-auto"
|
||||
onClick={handleClick}
|
||||
variant="contained"
|
||||
|
||||
Reference in New Issue
Block a user