add first open time for appo item and change component data, remove work time in location, add loading on links in page doctor list, fix bug search city and state in clinics page

This commit is contained in:
ehsan
2025-09-18 14:30:49 +03:30
parent a6386e693f
commit 2f078eba3c
17 changed files with 115 additions and 65 deletions
-1
View File
@@ -67,7 +67,6 @@ function Head({ matchedCity, matchedState, setDoctors }) {
throw err;
});
};
console.log(filter);
return (
<div className="flex justify-center gap-[16px] sm:gap-[19px] md:gap-[22px] lg:gap-[24px] flex-col items-center mt-0 md:mt-[40px] lg:mt-[90px]">
+1 -1
View File
@@ -16,7 +16,7 @@ function DoctorsPage({ matchedCity, matchedState, list }) {
matchedCity={matchedCity}
matchedState={matchedState}
/>
<ListDoctors list={doctors} />
<ListDoctors doctors={doctors} setDoctors={setDoctors} />
</div>
);
}
+11 -6
View File
@@ -1,15 +1,20 @@
import doctors from "@/data/doctors.json";
import doctorList from "@/data/doctors.json";
import Pagination from "@/app/component/Pagination";
import ItemDoctor from "@/app/component/ItemDoctor";
function ListDoctors({ list }) {
function ListDoctors({ doctors, setDoctors }) {
return (
<>
<div className="mt-[24px] sm:mt-[37px] md:mt-[50px] lg:mt-[64px]">
{list && list.length ? (
{doctors && doctors.length ? (
<ul className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-[24px]">
{list?.map((doctor) => (
<ItemDoctor key={doctor.id} doctor={doctor} />
{doctors?.map((doctor) => (
<ItemDoctor
key={doctor.id}
doctor={doctor}
doctors={doctors}
setDoctors={setDoctors}
/>
))}
</ul>
) : (
@@ -19,7 +24,7 @@ function ListDoctors({ list }) {
)}
</div>
<div className="mt-[56px] flex justify-center">
<Pagination list={doctors} itemsPerPage={12} />
<Pagination list={doctorList} itemsPerPage={12} />
</div>
</>
);