merge into Lino

This commit is contained in:
TheManus88
2024-06-13 20:28:38 -06:00
8 changed files with 42 additions and 22 deletions
+5
View File
@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/front_directorio.iml" filepath="$PROJECT_DIR$/.idea/front_directorio.iml" />
</modules>
</component>
</project>
Generated
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
-19
View File
@@ -11,7 +11,6 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"cross-env": "^7.0.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
@@ -6876,24 +6875,6 @@
"node": ">=10"
}
},
"node_modules/cross-env": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
"integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
"license": "MIT",
"dependencies": {
"cross-spawn": "^7.0.1"
},
"bin": {
"cross-env": "src/bin/cross-env.js",
"cross-env-shell": "src/bin/cross-env-shell.js"
},
"engines": {
"node": ">=10.14",
"npm": ">=6",
"yarn": ">=1"
}
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -1,4 +1,5 @@
import React, { useState } from 'react';
import "./style.css"
const LoginForm = () => {
const [username, setUsername] = useState('');
@@ -13,15 +14,18 @@ const LoginForm = () => {
setError(null);
try {
const response = await fetch(`${process.env.API_URL}/login`, {
const response = await fetch(`${process.env.API_URL}/auth/login`, {
method: 'POST',
body: JSON.stringify({ username, password, rememberMe }),
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ username, password}),
});
console.log(response)
console.log(process.env.API_URL)
if (!response.ok) {
throw new Error('Error en la solicitud');
throw new Error('Error in the log');
}
const data = await response.json();
View File
+4
View File
@@ -0,0 +1,4 @@
.submit{
width: 200px;
height: auto;
}