feat(doctors): add loading state management and pass filter to sendReq
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user