handle pagination in clinics page & change design login & fix bug filter state & change list most searched in home page & handle error page doctor item & change key url doctors and home page and get data from url & send data with url search to doctors page & show pagination only when list is long

This commit is contained in:
Ehsan
2025-05-18 01:07:22 +03:30
parent 80c7329916
commit 4a57468e26
15 changed files with 55 additions and 59 deletions
+2 -2
View File
@@ -20,11 +20,11 @@ function DoctorsPage({ params, matchedCity, matchedState }) {
});
const findItem = (name, value) => specialties.find(item => item[name] === value)
const itemCategory = findItem('id', params.category);
const itemExpertise = findItem('id', params.expertise);
const itemSpecialties = findItem('id', params.specialties);
const [data, setData] = useState({
category: itemCategory || "",
expertise: itemExpertise ? { ...itemExpertise, label: itemExpertise.name } : "",
specialties: itemSpecialties ? { ...itemSpecialties, label: itemSpecialties.name } : "",
turn: params && params.hasOwnProperty('turn') ? JSON.parse(params.turn) : 1,
gender: params.gender || "هر دو",
degree: params.degree || "متخصص",