Skip to content

Commit 36ae53e

Browse files
committed
fix: fixed variable name error
1 parent a8e2d13 commit 36ae53e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/SelectLocation.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command, CommandEmpty, CommandInput, CommandItem, CommandList } from 'c
55
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
66
import { ScrollArea } from '@/components/ui/scroll-area'
77
import { Button } from '@/components/ui/button'
8-
import CityAndDistrick from '@/data/cities_districts.json'
8+
import CityAndDistrict from '@/data/cities_districts.json'
99
import { cn } from '@/lib/utils'
1010

1111
interface SelectLocationProps {
@@ -21,10 +21,10 @@ const SelectLocation: React.FC<SelectLocationProps> = ({ type, value, onChange,
2121

2222
useEffect(() => {
2323
if (type === 'city') {
24-
setItems(CityAndDistrick)
24+
setItems(CityAndDistrict)
2525
} else if (type === 'district' && cityValue) {
2626
onChange('')
27-
const selectedCity = CityAndDistrick.find(city => city.name === cityValue)
27+
const selectedCity = CityAndDistrict.find(city => city.name === cityValue)
2828
setItems(selectedCity?.districts || [])
2929
}
3030
}, [type, cityValue, onChange])

0 commit comments

Comments
 (0)