fix(doctors): improve filter performance and resolve modal closing issues

This commit is contained in:
hamed
2026-06-21 15:47:37 +03:30
parent 2fc74a664e
commit cb13ba3f45
10 changed files with 232 additions and 58 deletions
+2 -10
View File
@@ -1,22 +1,14 @@
import { Button } from "@mui/material";
import { useState } from "react";
function ButtonApply({ sendReq, setOpen }) {
const [loading, setLoading] = useState(false);
const handleClick = () => {
setLoading(true);
sendReq().finally(() => {
setOpen(false);
setLoading(false);
});
setOpen(false);
sendReq();
};
return (
<div className="flex justify-end w-full">
<Button
disabled={loading}
variant="contained"
onClick={handleClick}
className="!px-3 !py-2 !text-[16px] !font-medium"