Clean project
This commit is contained in:
parent
ca6f1d1496
commit
d6339121b7
|
@ -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) {
|
||||||
|
|
|
@ -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, {
|
||||||
|
|
|
@ -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 (
|
||||||
|
|
Loading…
Reference in New Issue