modal search and default valud of province and city and handle search && show searched state in clinics page

This commit is contained in:
Ehsan
2025-05-15 00:16:09 +03:30
parent feba3c4a64
commit 60fe4c8040
12 changed files with 66 additions and 36 deletions
+4 -1
View File
@@ -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>
);
}
-1
View File
@@ -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