diff --git a/src/Components/Facility/FacilityFilter/index.tsx b/src/Components/Facility/FacilityFilter/index.tsx index ff4d3f89508..fd6edd664d1 100644 --- a/src/Components/Facility/FacilityFilter/index.tsx +++ b/src/Components/Facility/FacilityFilter/index.tsx @@ -1,7 +1,6 @@ import { navigate } from "raviger"; import { FACILITY_TYPES } from "../../../Common/constants"; import useMergeState from "../../../Common/hooks/useMergeState"; -import useConfig from "../../../Common/hooks/useConfig"; import FiltersSlideover from "../../../CAREUI/interactive/FiltersSlideover"; import { useTranslation } from "react-i18next"; import StateAutocompleteFormField from "../../Common/StateAutocompleteFormField"; @@ -15,19 +14,17 @@ const clearFilterState = { district: "", local_body: "", facility_type: "", - kasp_empanelled: "", }; function FacilityFilter(props: any) { const { t } = useTranslation(); const { filter, onChange, closeFilter } = props; - const { kasp_string } = useConfig(); + const [filterState, setFilterState] = useMergeState({ state: filter.state || "", district: filter.district || "", local_body: filter.local_body || "", facility_type: filter.facility_type || "", - kasp_empanelled: filter.kasp_empanelled || "", }); const applyFilter = () => { @@ -36,7 +33,6 @@ function FacilityFilter(props: any) { district: Number(filterState.district) || "", local_body: Number(filterState.local_body) || "", facility_type: filterState.facility_type || "", - kasp_empanelled: filterState.kasp_empanelled || "", }; onChange(data); }; @@ -92,17 +88,6 @@ function FacilityFilter(props: any) { optionValue={(option) => option.id} placeholder={t("show_all")} /> - option.text} - optionValue={(option) => option.id} - placeholder={t("show_all")} - /> );