diff --git a/src/components/Picker/CityPicker.tsx b/src/components/Picker/CityPicker.tsx index d4bbaa6..3fc6e51 100644 --- a/src/components/Picker/CityPicker.tsx +++ b/src/components/Picker/CityPicker.tsx @@ -11,9 +11,6 @@ interface PickerProps { setvisible: (visible: boolean) => void; options?: PickerOption[][] | PickerOption[]; value?: (string | number)[]; - type?: "month" | "day" | "hour" | "ntrp" | null; - img?: string; - onConfirm?: (options: PickerOption[], values: (string | number)[]) => void; onChange?: (value: (string | number)[]) => void; style?: React.CSSProperties; } @@ -22,7 +19,6 @@ const PopupPicker = ({ visible, setvisible, value = [], - onConfirm, onChange, options = [], style, @@ -33,7 +29,6 @@ const PopupPicker = ({ }; const handleConfirm = () => { - console.log(defaultValue, "defaultValue"); onChange?.(defaultValue); setvisible(false); }; diff --git a/src/container/listCustomNavbar/index.tsx b/src/container/listCustomNavbar/index.tsx index a57f39a..5bb8b17 100644 --- a/src/container/listCustomNavbar/index.tsx +++ b/src/container/listCustomNavbar/index.tsx @@ -23,15 +23,8 @@ interface IProps { function CityPicker(props) { const { visible, setVisible, cities, area, setArea } = props; console.log(cities, "cities"); - const [index, setIndex] = useState(0); const [value, setValue] = useState(area); - useEffect(() => { - if (visible) { - setIndex(index + 1); - } - }, [visible]); - function onChange(value: any) { console.log(value, "value"); setValue(value); @@ -40,7 +33,6 @@ function CityPicker(props) { return ( visible && ( { - + {cityPopupVisible && ( + + )} ); };