Clean project

This commit is contained in:
Maria Sanchez 2022-08-22 14:31:47 -06:00
parent ca6f1d1496
commit d6339121b7
3 changed files with 64 additions and 78 deletions

View File

@ -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) {

View File

@ -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, {

View File

@ -1,20 +1,16 @@
import React from "react";
import React, { useContext } from "react";
import {
Box,
Heading,
VStack,
FormControl,
Button,
Center,
ScrollView
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 (