diff --git a/mobile-ui/components/Home.js b/mobile-ui/components/Home.js index 0467f85f..d05a12bf 100644 --- a/mobile-ui/components/Home.js +++ b/mobile-ui/components/Home.js @@ -14,7 +14,6 @@ export default function Home() { useEffect(() => { const onRequestCommentsData = async () => { - console.log("CALLED?") setIsRequesting(true); try { @@ -27,8 +26,6 @@ export default function Home() { const response = await jsonResponse.json(); - console.log(response); - setComments(response.message); } catch (error) { diff --git a/mobile-ui/components/LogIn.js b/mobile-ui/components/LogIn.js index 024c7811..97dc08c0 100644 --- a/mobile-ui/components/LogIn.js +++ b/mobile-ui/components/LogIn.js @@ -19,12 +19,6 @@ import { UserContext } from "../context/UserContext"; import { API } from "../environment/api"; const baseURL = `${API.BASE_URL}/user/loginUser`; -const cookies = new Cookies(); - -// const handleChange = (value) => { -// console.log(value); - -// } export default function LogIn({ navigation }) { @@ -39,7 +33,6 @@ export default function LogIn({ navigation }) { const onHandleChange = (name) => (value) => setCredentials(prev => ({ ...prev, [name]: value })) const iniciarSesion = async () => { - console.log(credentials) try { await fetch(baseURL, { diff --git a/mobile-ui/components/Profile.js b/mobile-ui/components/Profile.js index e17e35e0..a84862db 100644 --- a/mobile-ui/components/Profile.js +++ b/mobile-ui/components/Profile.js @@ -1,84 +1,80 @@ -import React from "react"; +import React, { useContext } from "react"; import { - Box, - Heading, - VStack, - FormControl, - Button, - Center, - ScrollView - } from "native-base"; + Box, Button, + Center, FormControl, Heading, ScrollView, VStack +} from "native-base"; - import { View, TextInput, StyleSheet } from "react-native"; +import { StyleSheet, TextInput } from "react-native"; +import { UserContext } from "../context/UserContext"; -export default function Profile({route, navigation}){ +export default function Profile({ navigation }) { - const userData = JSON.parse(JSON.stringify(route.params)); + const userData = useContext(UserContext) console.log(userData.user); - return ( -