From 2ff22f63dfa1e5f0fb46f3f17e36ec265c8f4a72 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Mon, 17 Jul 2023 14:13:04 +0800 Subject: [PATCH] Fixed missing libraries --- package-lock.json | 2 +- package.json | 8 +- src/routes/UserInfo/UserInfo.tsx | 341 ++++++++++++++++--------------- 3 files changed, 180 insertions(+), 171 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6960559..349587f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@reduxjs/toolkit": "^1.9.5", - "@tanstack/react-query": "^4.29.19", + "@tanstack/react-query": "^4.29.25", "axios": "^1.4.0", "expo": "~48.0.18", "expo-intent-launcher": "~10.5.2", diff --git a/package.json b/package.json index bf7ee0c..60f4b66 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,11 @@ "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@reduxjs/toolkit": "^1.9.5", - "@tanstack/react-query": "^4.29.19", + "@tanstack/react-query": "^4.29.25", "axios": "^1.4.0", "expo": "~48.0.18", - "expo-linking": "~4.0.1", "expo-intent-launcher": "~10.5.2", + "expo-linking": "~4.0.1", "expo-location": "~15.1.1", "expo-status-bar": "~1.4.4", "moti": "^0.25.3", @@ -27,6 +27,7 @@ "react-native-dropdown-picker": "^5.4.6", "react-native-gesture-handler": "~2.9.0", "react-native-image-picker": "^5.6.0", + "react-native-maps": "1.3.2", "react-native-modal": "^13.0.1", "react-native-reanimated": "~2.14.4", "react-native-safe-area-context": "4.5.0", @@ -35,8 +36,7 @@ "react-native-svg": "13.4.0", "react-query": "^3.39.3", "react-redux": "^8.1.1", - "redux": "^4.2.1", - "react-native-maps": "1.3.2" + "redux": "^4.2.1" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/src/routes/UserInfo/UserInfo.tsx b/src/routes/UserInfo/UserInfo.tsx index b0a5c27..856f817 100644 --- a/src/routes/UserInfo/UserInfo.tsx +++ b/src/routes/UserInfo/UserInfo.tsx @@ -17,6 +17,9 @@ import { TouchableOpacity, Image } from "react-native"; import { ScrollView } from "react-native-gesture-handler"; import SelectDropdown from "react-native-select-dropdown"; import DropdownIcon from "../../icons/DropdownIcon/DropdownIcon"; +import { useQuery } from "react-query"; +import { UserInfo as GetUserInfo } from "../../components/Api/Api"; +import { err } from "react-native-svg/lib/typescript/xml"; export default function UserInfo() { const navigation = useNavigation(); @@ -35,173 +38,179 @@ export default function UserInfo() { semester: "", course: "", }); - return ( - - - - Kurt Toledo - - - console.log(data), + }); + if (!isLoading && !error) { + return ( + + + + Kurt Toledo + + + + + + Student {isActive ? "Active" : "Inactive"} + + + + - - - 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"} - - - - - 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"} - - - - - ); + + + ); + } }