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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user