From 49a74775f5964f6c30e98d84643b58f8b24a66c0 Mon Sep 17 00:00:00 2001 From: baraganio Date: Wed, 27 Mar 2024 23:21:08 +0100 Subject: [PATCH] Quitar dependencias y variables inutiles (no falle el deploy) 2 --- webapp/src/components/Login.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/webapp/src/components/Login.js b/webapp/src/components/Login.js index 660fd039..0e39f9b6 100644 --- a/webapp/src/components/Login.js +++ b/webapp/src/components/Login.js @@ -11,7 +11,6 @@ const Login = () => { const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [loginSuccess, setLoginSuccess] = useState(false); - const [createdAt, setCreatedAt] = useState(''); const [openSnackbar, setOpenSnackbar] = useState(false); // Declara las variables (izquierda) y el metodo que la modifica (derecha). Se inicializa a false (useState) @@ -21,12 +20,8 @@ const Login = () => { const loginUser = async () => { try { - const response = await axios.post(`${apiEndpoint}/login`, { username, password }); + await axios.post(`${apiEndpoint}/login`, { username, password }); - // Extract data from the response - const { createdAt: userCreatedAt } = response.data; - - setCreatedAt(userCreatedAt); setLoginSuccess(true); setOpenSnackbar(true);