From 003d5532027660c7c94b2af8c2d65c22b982d1f2 Mon Sep 17 00:00:00 2001 From: ehsan Date: Sat, 3 May 2025 16:15:33 +0330 Subject: [PATCH] remove default value for handle filter list city by data in url --- app/component/modalSearchCity/Content.js | 8 +++++--- app/component/modalSearchCity/index.js | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/component/modalSearchCity/Content.js b/app/component/modalSearchCity/Content.js index 3edf6a1..fc069ab 100644 --- a/app/component/modalSearchCity/Content.js +++ b/app/component/modalSearchCity/Content.js @@ -48,9 +48,11 @@ function Content({ name="city" label="شهر" disabled={ - !isProvinceInclude || - !provinceSelected || - filteredCities.length === 0 + isProvinceInclude + ? !isProvinceInclude || + !provinceSelected || + filteredCities.length === 0 + : !provinceSelected || filteredCities.length === 0 } /> diff --git a/app/component/modalSearchCity/index.js b/app/component/modalSearchCity/index.js index 0e298dc..caa0d0f 100644 --- a/app/component/modalSearchCity/index.js +++ b/app/component/modalSearchCity/index.js @@ -11,8 +11,7 @@ import Content from "./Content"; function ModalSearchCity({ children, selected, setSelected, open, setOpen }) { const provinceSelected = selected.province; - // const hostName = window.location.host; - const hostName = "urmia-nobat.ir"; + const hostName = window.location.host; const isProvinceInclude = citiesData.find( (city) => city.domain !== "nobat724.com" && hostName.includes(city.domain) );