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(() => { useEffect(() => {
const onRequestCommentsData = async () => { const onRequestCommentsData = async () => {
console.log("CALLED?")
setIsRequesting(true); setIsRequesting(true);
try { try {
@ -27,8 +26,6 @@ export default function Home() {
const response = await jsonResponse.json(); const response = await jsonResponse.json();
console.log(response);
setComments(response.message); setComments(response.message);
} catch (error) { } catch (error) {

View File

@ -19,12 +19,6 @@ import { UserContext } from "../context/UserContext";
import { API } from "../environment/api"; import { API } from "../environment/api";
const baseURL = `${API.BASE_URL}/user/loginUser`; const baseURL = `${API.BASE_URL}/user/loginUser`;
const cookies = new Cookies();
// const handleChange = (value) => {
// console.log(value);
// }
export default function LogIn({ navigation }) { export default function LogIn({ navigation }) {
@ -39,7 +33,6 @@ export default function LogIn({ navigation }) {
const onHandleChange = (name) => (value) => setCredentials(prev => ({ ...prev, [name]: value })) const onHandleChange = (name) => (value) => setCredentials(prev => ({ ...prev, [name]: value }))
const iniciarSesion = async () => { const iniciarSesion = async () => {
console.log(credentials)
try { try {
await fetch(baseURL, { await fetch(baseURL, {

View File

@ -1,20 +1,16 @@
import React from "react"; import React, { useContext } from "react";
import { import {
Box, Box, Button,
Heading, Center, FormControl, Heading, ScrollView, VStack
VStack,
FormControl,
Button,
Center,
ScrollView
} from "native-base"; } 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); console.log(userData.user);
return ( return (