diff --git a/app/component/ItemDoctor.js b/app/component/ItemDoctor.js index 7d9e92f..f96f9f1 100644 --- a/app/component/ItemDoctor.js +++ b/app/component/ItemDoctor.js @@ -23,16 +23,18 @@ function ItemDoctor({ doctor }) { image-doctor
-

- {doctor?.name} -

+ +

+ {doctor?.name} +

+

@@ -89,10 +91,7 @@ function ItemDoctor({ doctor }) { diff --git a/app/doctors/page.js b/app/doctors/page.js index 30872fa..6c9ee39 100644 --- a/app/doctors/page.js +++ b/app/doctors/page.js @@ -10,6 +10,9 @@ async function Doctors({ searchParams }) { let doctors = null; try { + let newSearchParams = searchParams; + if (matchedCity) newSearchParams.city = matchedCity.name; + if (matchedState) newSearchParams.state = matchedState.name; const params = buildDoctorParams(searchParams); const response = await axios.get(`${API_URL}/api/v1/doctors`, { diff --git a/components/home/search/RedirectLink.js b/components/home/search/RedirectLink.js index f9671d5..6a10ab3 100644 --- a/components/home/search/RedirectLink.js +++ b/components/home/search/RedirectLink.js @@ -20,7 +20,7 @@ function RedirectLink({ data }) { if (specialtyItem) { filters.specialty = specialtyItem.name; } else { - filters.search = data.search; + filters.name = data.search; } }