import * as React from "react"; import styles from "../../styles"; import { View, Text, TextInput, NativeSyntheticEvent, TextInputChangeEventData, } from "react-native"; import { colors } from "../../styles"; import { useState, useEffect } from "react"; import Button from "../../components/Button/Button"; import { useNavigation } from "@react-navigation/native"; import { RootDrawerParamList } from "../../interfaces/Interfaces"; import SignupIcon from "../../icons/SignupIcon/SignupIcon"; import { UserRegister } from "../../components/Api/Api"; import IsNumber from "../../components/IsNumber/IsNumber"; import ParseError from "../../components/ParseError/ParseError"; import AnimatedContainer from "../../components/AnimatedContainer/AnimatedContainer"; import {TouchableOpacity, Image} from "react-native"; import { ScrollView } from "react-native-gesture-handler"; import Select, { SelectConfig, SelectItem } from '@redmin_delishaj/react-native-select'; import DropDownPicker from 'react-native-dropdown-picker' import SelectDropdown from 'react-native-select-dropdown' import DropdownIcon from "../../icons/DropdownIcon/DropdownIcon"; export default function UserInfo() { const navigation = useNavigation(); const [isEditable, setIsEditable] = useState(false); const options = ["", "", "", ""]; const [isActive, setIsActive] = useState(false); const toggleUserActive = () => { setIsActive(!isActive); }; //const dispatch = useDispatch(); // const creds = useSelector((state: RootState) => state.auth.creds); const [user, setUser] = useState({ first_name: "", last_name: "", year_level: "", semester: "", course: "", }); return ( Kurt Toledo Student {isActive ? 'Active' : 'Inactive'} First Name ): void => { setUser ({...user, first_name: e.nativeEvent.text}); }} /> Last Name ): void => { setUser ({...user, first_name: e.nativeEvent.text}); }} /> Year Level ): void => { setUser ({...user, first_name: e.nativeEvent.text}); }} /> Semester ): void => { setUser ({...user, first_name: e.nativeEvent.text}); }} /> Course ): void => { setUser ({...user, first_name: e.nativeEvent.text}); }} /> Subject { console.log(selectedItem, index) }} renderDropdownIcon={() => } buttonTextStyle={{ color: "white" }} dropdownStyle={{ backgroundColor: "#E3963E", }} data={options} buttonStyle={{ width: "90%", marginLeft: 10, backgroundColor: "#E3963E", borderRadius: 8 }} /> setIsEditable(!isEditable)} > {isEditable ? "Save" : "Edit Profile"} ); }