modal search and default valud of province and city and handle search && show searched state in clinics page
This commit is contained in:
+4
-1
@@ -1,10 +1,13 @@
|
||||
import ClinicsPage from "@/components/clinics";
|
||||
import Layout from "@/components/layout/StLayout";
|
||||
import { getStateInfo } from "@/lib/getStateInfo";
|
||||
|
||||
function Clinics() {
|
||||
const { matchedCity, matchedState } = getStateInfo();
|
||||
|
||||
return (
|
||||
<Layout name='/clinics'>
|
||||
<ClinicsPage />
|
||||
<ClinicsPage matchedCity={matchedCity} matchedState={matchedState} />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ function ModalSearchCity({ children, selected, state, setSelected, open, setOpen
|
||||
const handleClose = () => setOpen(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
if (provinceSelected) {
|
||||
const selectedState = states.find(
|
||||
(state) => state.label === provinceSelected
|
||||
|
||||
Reference in New Issue
Block a user