change key field to specialty, filter list doctors with name, remove loading state from doctors page, save state id in url
This commit is contained in:
@@ -2,14 +2,14 @@ import doctors from "@/data/doctors.json";
|
||||
import Pagination from "@/app/component/Pagination";
|
||||
import ItemDoctor from "@/app/component/ItemDoctor";
|
||||
|
||||
function ListDoctors({ loading, list }) {
|
||||
function ListDoctors({ list }) {
|
||||
return (
|
||||
<>
|
||||
<div className="mt-[24px] sm:mt-[37px] md:mt-[50px] lg:mt-[64px]">
|
||||
{list && list.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} loading={loading} />
|
||||
<ItemDoctor key={doctor.id} doctor={doctor} />
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user