change format all file
This commit is contained in:
@@ -18,10 +18,10 @@ function ButtonFilter({ selected, setOpen }) {
|
||||
<Location />
|
||||
</div>
|
||||
<p
|
||||
className='text-[#616161] text-[11px] md:text-[14px] leading-[17px] sm:leading-[19px]
|
||||
md:leading-[22px] lg:leading-[24px] font-medium ml-1 md:mx-1'
|
||||
className="text-[#616161] text-[11px] md:text-[14px] leading-[17px] sm:leading-[19px]
|
||||
md:leading-[22px] lg:leading-[24px] font-medium ml-1 md:mx-1"
|
||||
>
|
||||
{selected.city || 'شهر'}
|
||||
{selected.city || "شهر"}
|
||||
</p>
|
||||
<div className="w-[16px] h-[16px] md:w-[18px] md:h-[18px] lg:w-[20px] lg:h-[20px] grid place-items-center">
|
||||
<ArrowBottomH />
|
||||
|
||||
@@ -23,9 +23,9 @@ function Content({
|
||||
};
|
||||
|
||||
const handleFilter = () => {
|
||||
handleSearch && handleSearch('');
|
||||
handleSearch && handleSearch("");
|
||||
handleClose();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -10,7 +10,15 @@ import statesData from "@/data/state.json";
|
||||
import citiesData from "@/data/city.json";
|
||||
import Content from "./Content";
|
||||
|
||||
function ModalSearchCity({ children, selected, handleSearch, state, setSelected, open, setOpen }) {
|
||||
function ModalSearchCity({
|
||||
children,
|
||||
selected,
|
||||
handleSearch,
|
||||
state,
|
||||
setSelected,
|
||||
open,
|
||||
setOpen,
|
||||
}) {
|
||||
const provinceSelected = selected.province;
|
||||
|
||||
const states = addLabelToList(statesData);
|
||||
@@ -22,12 +30,12 @@ function ModalSearchCity({ children, selected, handleSearch, state, setSelected,
|
||||
useEffect(() => {
|
||||
if (provinceSelected) {
|
||||
const selectedState = states.find(
|
||||
(state) => state.label === provinceSelected
|
||||
(state) => state.label === provinceSelected,
|
||||
);
|
||||
if (selectedState) {
|
||||
const stateId = selectedState.id;
|
||||
const filteredCities = cities.filter(
|
||||
(city) => city.province_id === stateId
|
||||
(city) => city.province_id === stateId,
|
||||
);
|
||||
setFilteredCities(filteredCities);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user