Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| 654038c13a |
5 changed files with 205 additions and 16 deletions
|
|
@ -3,4 +3,4 @@
|
||||||
Para el módulo "Introducción a React" del curso de desarrollo full stack con
|
Para el módulo "Introducción a React" del curso de desarrollo full stack con
|
||||||
JavaScript de Desafío Latam.
|
JavaScript de Desafío Latam.
|
||||||
|
|
||||||
Un prototipo de página de pizzería
|
Un prototipo de página de pizzería.
|
||||||
|
|
|
||||||
177
pnpm-lock.yaml
177
pnpm-lock.yaml
|
|
@ -27,9 +27,9 @@ importers:
|
||||||
'@unocss/reset':
|
'@unocss/reset':
|
||||||
specifier: ^66.6.7
|
specifier: ^66.6.7
|
||||||
version: 66.6.7
|
version: 66.6.7
|
||||||
'@vitejs/plugin-react':
|
'@vitejs/plugin-react-swc':
|
||||||
specifier: ^6.0.1
|
specifier: ^4.3.0
|
||||||
version: 6.0.1(vite@8.0.2(jiti@2.6.1))
|
version: 4.3.0(vite@8.0.2(jiti@2.6.1))
|
||||||
eslint:
|
eslint:
|
||||||
specifier: ^9.39.4
|
specifier: ^9.39.4
|
||||||
version: 9.39.4(jiti@2.6.1)
|
version: 9.39.4(jiti@2.6.1)
|
||||||
|
|
@ -449,6 +449,99 @@ packages:
|
||||||
'@rolldown/pluginutils@1.0.0-rc.7':
|
'@rolldown/pluginutils@1.0.0-rc.7':
|
||||||
resolution: {integrity: sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==}
|
resolution: {integrity: sha512-qujRfC8sFVInYSPPMLQByRh7zhwkGFS4+tyMQ83srV1qrxL4g8E2tyxVVyxd0+8QeBM1mIk9KbWxkegRr76XzA==}
|
||||||
|
|
||||||
|
'@swc/core-darwin-arm64@1.15.21':
|
||||||
|
resolution: {integrity: sha512-SA8SFg9dp0qKRH8goWsax6bptFE2EdmPf2YRAQW9WoHGf3XKM1bX0nd5UdwxmC5hXsBUZAYf7xSciCler6/oyA==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [darwin]
|
||||||
|
|
||||||
|
'@swc/core-darwin-x64@1.15.21':
|
||||||
|
resolution: {integrity: sha512-//fOVntgowz9+V90lVsNCtyyrtbHp3jWH6Rch7MXHXbcvbLmbCTmssl5DeedUWLLGiAAW1wksBdqdGYOTjaNLw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [darwin]
|
||||||
|
|
||||||
|
'@swc/core-linux-arm-gnueabihf@1.15.21':
|
||||||
|
resolution: {integrity: sha512-meNI4Sh6h9h8DvIfEc0l5URabYMSuNvyisLmG6vnoYAS43s8ON3NJR8sDHvdP7NJTrLe0q/x2XCn6yL/BeHcZg==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [arm]
|
||||||
|
os: [linux]
|
||||||
|
|
||||||
|
'@swc/core-linux-arm64-gnu@1.15.21':
|
||||||
|
resolution: {integrity: sha512-QrXlNQnHeXqU2EzLlnsPoWEh8/GtNJLvfMiPsDhk+ht6Xv8+vhvZ5YZ/BokNWSIZiWPKLAqR0M7T92YF5tmD3g==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
|
|
||||||
|
'@swc/core-linux-arm64-musl@1.15.21':
|
||||||
|
resolution: {integrity: sha512-8/yGCMO333ultDaMQivE5CjO6oXDPeeg1IV4sphojPkb0Pv0i6zvcRIkgp60xDB+UxLr6VgHgt+BBgqS959E9g==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [musl]
|
||||||
|
|
||||||
|
'@swc/core-linux-ppc64-gnu@1.15.21':
|
||||||
|
resolution: {integrity: sha512-ucW0HzPx0s1dgRvcvuLSPSA/2Kk/VYTv9st8qe1Kc22Gu0Q0rH9+6TcBTmMuNIp0Xs4BPr1uBttmbO1wEGI49Q==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [ppc64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
|
|
||||||
|
'@swc/core-linux-s390x-gnu@1.15.21':
|
||||||
|
resolution: {integrity: sha512-ulTnOGc5I7YRObE/9NreAhQg94QkiR5qNhhcUZ1iFAYjzg/JGAi1ch+s/Ixe61pMIr8bfVrF0NOaB0f8wjaAfA==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [s390x]
|
||||||
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
|
|
||||||
|
'@swc/core-linux-x64-gnu@1.15.21':
|
||||||
|
resolution: {integrity: sha512-D0RokxtM+cPvSqJIKR6uja4hbD+scI9ezo95mBhfSyLUs9wnPPl26sLp1ZPR/EXRdYm3F3S6RUtVi+8QXhT24Q==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [glibc]
|
||||||
|
|
||||||
|
'@swc/core-linux-x64-musl@1.15.21':
|
||||||
|
resolution: {integrity: sha512-nER8u7VeRfmU6fMDzl1NQAbbB/G7O2avmvCOwIul1uGkZ2/acbPH+DCL9h5+0yd/coNcxMBTL6NGepIew+7C2w==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [linux]
|
||||||
|
libc: [musl]
|
||||||
|
|
||||||
|
'@swc/core-win32-arm64-msvc@1.15.21':
|
||||||
|
resolution: {integrity: sha512-+/AgNBnjYugUA8C0Do4YzymgvnGbztv7j8HKSQLvR/DQgZPoXQ2B3PqB2mTtGh/X5DhlJWiqnunN35JUgWcAeQ==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [arm64]
|
||||||
|
os: [win32]
|
||||||
|
|
||||||
|
'@swc/core-win32-ia32-msvc@1.15.21':
|
||||||
|
resolution: {integrity: sha512-IkSZj8PX/N4HcaFhMQtzmkV8YSnuNoJ0E6OvMwFiOfejPhiKXvl7CdDsn1f4/emYEIDO3fpgZW9DTaCRMDxaDA==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [ia32]
|
||||||
|
os: [win32]
|
||||||
|
|
||||||
|
'@swc/core-win32-x64-msvc@1.15.21':
|
||||||
|
resolution: {integrity: sha512-zUyWso7OOENB6e1N1hNuNn8vbvLsTdKQ5WKLgt/JcBNfJhKy/6jmBmqI3GXk/MyvQKd5SLvP7A0F36p7TeDqvw==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
cpu: [x64]
|
||||||
|
os: [win32]
|
||||||
|
|
||||||
|
'@swc/core@1.15.21':
|
||||||
|
resolution: {integrity: sha512-fkk7NJcBscrR3/F8jiqlMptRHP650NxqDnspBMrRe5d8xOoCy9MLL5kOBLFXjFLfMo3KQQHhk+/jUULOMlR1uQ==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
peerDependencies:
|
||||||
|
'@swc/helpers': '>=0.5.17'
|
||||||
|
peerDependenciesMeta:
|
||||||
|
'@swc/helpers':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/counter@0.1.3':
|
||||||
|
resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
|
||||||
|
|
||||||
|
'@swc/types@0.1.26':
|
||||||
|
resolution: {integrity: sha512-lyMwd7WGgG79RS7EERZV3T8wMdmPq3xwyg+1nmAM64kIhx5yl+juO2PYIHb7vTiPgPCj8LYjsNV2T5wiQHUEaw==}
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==}
|
||||||
|
|
||||||
|
|
@ -538,18 +631,11 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0 || ^8.0.0-0
|
vite: ^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0 || ^8.0.0-0
|
||||||
|
|
||||||
'@vitejs/plugin-react@6.0.1':
|
'@vitejs/plugin-react-swc@4.3.0':
|
||||||
resolution: {integrity: sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ==}
|
resolution: {integrity: sha512-mOkXCII839dHyAt/gpoSlm28JIVDwhZ6tnG6wJxUy2bmOx7UaPjvOyIDf3SFv5s7Eo7HVaq6kRcu6YMEzt5Z7w==}
|
||||||
engines: {node: ^20.19.0 || >=22.12.0}
|
engines: {node: ^20.19.0 || >=22.12.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@rolldown/plugin-babel': ^0.1.7 || ^0.2.0
|
vite: ^4 || ^5 || ^6 || ^7 || ^8
|
||||||
babel-plugin-react-compiler: ^1.0.0
|
|
||||||
vite: ^8.0.0
|
|
||||||
peerDependenciesMeta:
|
|
||||||
'@rolldown/plugin-babel':
|
|
||||||
optional: true
|
|
||||||
babel-plugin-react-compiler:
|
|
||||||
optional: true
|
|
||||||
|
|
||||||
acorn-jsx@5.3.2:
|
acorn-jsx@5.3.2:
|
||||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||||
|
|
@ -1578,6 +1664,66 @@ snapshots:
|
||||||
|
|
||||||
'@rolldown/pluginutils@1.0.0-rc.7': {}
|
'@rolldown/pluginutils@1.0.0-rc.7': {}
|
||||||
|
|
||||||
|
'@swc/core-darwin-arm64@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-darwin-x64@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-arm-gnueabihf@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-arm64-gnu@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-arm64-musl@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-ppc64-gnu@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-s390x-gnu@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-x64-gnu@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-linux-x64-musl@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-win32-arm64-msvc@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-win32-ia32-msvc@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core-win32-x64-msvc@1.15.21':
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
'@swc/core@1.15.21':
|
||||||
|
dependencies:
|
||||||
|
'@swc/counter': 0.1.3
|
||||||
|
'@swc/types': 0.1.26
|
||||||
|
optionalDependencies:
|
||||||
|
'@swc/core-darwin-arm64': 1.15.21
|
||||||
|
'@swc/core-darwin-x64': 1.15.21
|
||||||
|
'@swc/core-linux-arm-gnueabihf': 1.15.21
|
||||||
|
'@swc/core-linux-arm64-gnu': 1.15.21
|
||||||
|
'@swc/core-linux-arm64-musl': 1.15.21
|
||||||
|
'@swc/core-linux-ppc64-gnu': 1.15.21
|
||||||
|
'@swc/core-linux-s390x-gnu': 1.15.21
|
||||||
|
'@swc/core-linux-x64-gnu': 1.15.21
|
||||||
|
'@swc/core-linux-x64-musl': 1.15.21
|
||||||
|
'@swc/core-win32-arm64-msvc': 1.15.21
|
||||||
|
'@swc/core-win32-ia32-msvc': 1.15.21
|
||||||
|
'@swc/core-win32-x64-msvc': 1.15.21
|
||||||
|
|
||||||
|
'@swc/counter@0.1.3': {}
|
||||||
|
|
||||||
|
'@swc/types@0.1.26':
|
||||||
|
dependencies:
|
||||||
|
'@swc/counter': 0.1.3
|
||||||
|
|
||||||
'@tybys/wasm-util@0.10.1':
|
'@tybys/wasm-util@0.10.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
tslib: 2.8.1
|
tslib: 2.8.1
|
||||||
|
|
@ -1726,10 +1872,13 @@ snapshots:
|
||||||
unplugin-utils: 0.3.1
|
unplugin-utils: 0.3.1
|
||||||
vite: 8.0.2(jiti@2.6.1)
|
vite: 8.0.2(jiti@2.6.1)
|
||||||
|
|
||||||
'@vitejs/plugin-react@6.0.1(vite@8.0.2(jiti@2.6.1))':
|
'@vitejs/plugin-react-swc@4.3.0(vite@8.0.2(jiti@2.6.1))':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@rolldown/pluginutils': 1.0.0-rc.7
|
'@rolldown/pluginutils': 1.0.0-rc.7
|
||||||
|
'@swc/core': 1.15.21
|
||||||
vite: 8.0.2(jiti@2.6.1)
|
vite: 8.0.2(jiti@2.6.1)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@swc/helpers'
|
||||||
|
|
||||||
acorn-jsx@5.3.2(acorn@8.16.0):
|
acorn-jsx@5.3.2(acorn@8.16.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,7 @@ footer {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
--uno: "border-2 border-grey-300 rounded-md";
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,16 @@ import Navbar from "./Navbar";
|
||||||
import "./App.css";
|
import "./App.css";
|
||||||
import Home from "./Home";
|
import Home from "./Home";
|
||||||
import Footer from "./Footer";
|
import Footer from "./Footer";
|
||||||
|
import Register from "./Register";
|
||||||
|
import Login from "./Login";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<Home />
|
{/*<Home />*/}
|
||||||
|
{/*<Register />*/}
|
||||||
|
<Login />
|
||||||
<Footer />
|
<Footer />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
32
src/Login.jsx
Normal file
32
src/Login.jsx
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
const Login = () => {
|
||||||
|
const [user, setUser] = useState("");
|
||||||
|
const [pass, setPass] = useState("");
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<p>Usuario</p>
|
||||||
|
<input type="text" onChange={(ev) => setUser(ev.target.value)} />
|
||||||
|
<p>Contraseña</p>
|
||||||
|
<input type="password" onChange={(ev) => setPass(ev.target.value)} />
|
||||||
|
<p>Confirmar contraseña</p>
|
||||||
|
<button
|
||||||
|
className="p-2 rounded-md bg-teal-400"
|
||||||
|
onClick={() => {
|
||||||
|
if (pass.length < 6) {
|
||||||
|
alert("La contraseña debe tener por lo menos 6 caracteres");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (user.length === 0) {
|
||||||
|
alert("Se requiere un nombre de usuario");
|
||||||
|
}
|
||||||
|
alert("Autenticacion exitosa");
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Iniciar sesión
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Login;
|
||||||
Loading…
Reference in a new issue