diff --git a/src/App.tsx b/src/App.tsx index 4607673..e77c373 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,10 +1,11 @@ import './App.css' import Catalog from './pages/catalog/Catalog' - +import Login from './pages/login/Login' function App() { return ( <> + ) diff --git a/src/pages/index.ts b/src/pages/index.ts index cc98181..c8eb224 100644 --- a/src/pages/index.ts +++ b/src/pages/index.ts @@ -1 +1,2 @@ export * from './catalog/'; +export * from './login/'; diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx new file mode 100644 index 0000000..b197168 --- /dev/null +++ b/src/pages/login/Login.tsx @@ -0,0 +1,42 @@ +import React, { useState } from "react"; + +const Login = () => { + const [user, setUser] = useState(""); + const [password, setPassword] = useState(""); + + function handleUserChange(e: React.ChangeEvent): void { + setUser(e.target.value); + } + + function handlePasswordChange(e: React.ChangeEvent): void { + setPassword(e.target.value); + } + + function handleSubmit(e: React.FormEvent): void { + e.preventDefault(); + alert([user, password]); + setUser(""); + setPassword(""); + } + return ( + <> +
+

Inicia sesión.

+
+
+
+ Imagen
+ +
+
+
+
+ +
+
+ + ) +}; + + +export default Login; diff --git a/src/pages/login/index.ts b/src/pages/login/index.ts new file mode 100644 index 0000000..f704ccb --- /dev/null +++ b/src/pages/login/index.ts @@ -0,0 +1 @@ +export * from './Login.tsx';