feat(doctors): add loading state management and pass filter to sendReq

This commit is contained in:
hamed
2026-06-21 16:24:09 +03:30
parent cb13ba3f45
commit cbae19d270
4 changed files with 14 additions and 4 deletions
+4
View File
@@ -45,6 +45,7 @@ function DoctorsPage({ matchedCity, matchedState, list }) {
};
const [filter, setFilter] = useState(defaultFilter);
const [loading, setLoading] = useState(false);
return (
<div className="pt-[95px] sm:pt-[120px] padding-responsive">
@@ -54,6 +55,7 @@ function DoctorsPage({ matchedCity, matchedState, list }) {
setPage={setPage}
setFilter={setFilter}
setDoctors={setDoctors}
setLoading={setLoading}
matchedCity={matchedCity}
matchedState={matchedState}
/>
@@ -64,6 +66,8 @@ function DoctorsPage({ matchedCity, matchedState, list }) {
filter={filter}
setPage={setPage}
doctors={doctors}
loading={loading}
setLoading={setLoading}
setDoctors={setDoctors}
/>
</div>