fix bug modal search location in home && send request after click on continue for update list clinics && change style on hover text of specialties and service in clinics page && add loading for list of clinics && fix bug page doctor item && link footer to clinic-pro

This commit is contained in:
ehsan
2025-09-29 00:36:55 +03:30
parent d69d133e4c
commit b10fa6259e
21 changed files with 448 additions and 107 deletions
+19 -3
View File
@@ -7,7 +7,17 @@ import { Button } from "@mui/material";
import Image from "next/image";
import Link from "next/link";
function ItemClinic({ data, loading }) {
function ItemClinic({ setFilteredClinics, data, loading }) {
const handleLoading = () => {
setFilteredClinics((prevClinics) =>
prevClinics.map((item) =>
item.id === data.id
? { ...item, loading: true }
: { ...item, loading: false }
)
);
};
return (
<li className="p-4 relative bg-[#FFF] border border-solid border-[#EFEFEF] rounded-[8px]">
<div className="flex items-center justify-start gap-2">
@@ -54,8 +64,14 @@ function ItemClinic({ data, loading }) {
{/* Arrow */}
<Link href={`/clinic/${data.uuid}`}>
<Button className="!bg-[#5559CE] !p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit">
<ArrowLeftD />
<Button
onClick={handleLoading}
loading={data?.loading}
className="!bg-[#5559CE] !p-[14px] !absolute !left-4 !bottom-4 !rounded-full !w-fit"
>
<div className={data && data.loading ? "opacity-0" : ""}>
<ArrowLeftD />
</div>
</Button>
</Link>
</li>