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:
Ehsan
2025-09-07 10:22:53 +03:30
parent dc40129034
commit 10d4c39a4d
11 changed files with 142 additions and 59 deletions
+2 -2
View File
@@ -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>
) : (