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