import { View, Text, TouchableOpacity, Picker } from "react-native-ui-lib"; import React, { useEffect, useState } from "react"; const RepeatFreq = () => { const [weeks, setWeeks] = useState(1); const weekOptions: number[] = Array.from({ length: 52 }, (_, i) => i + 1); useEffect(() => { }, [weeks]); return ( {weeks == 1 ? "Week" : "Weeks"} } value={weeks} onChange={(value) => { if (typeof value === "number") { setWeeks(value); } }} placeholder={"Select number of weeks"} useWheelPicker color={"#fd1575"} style={{ maxWidth: 18, fontFamily: "Manrope_700Bold", }} containerStyle={{ borderWidth: 1, borderRadius: 6, paddingRight: 5, paddingLeft: 3, borderColor: "#fd1575", backgroundColor: "#ffe8f1", }} > {weekOptions.map((num) => ( ))} ); }; export default RepeatFreq; const RepeatOption = ({ value }: { value: string }) => { const [isSet, setisSet] = useState(false); return ( setisSet(!isSet)}> {value.at(0)} ); };