From 59c04276acfcdf6b7c90aee23839d2be9acf4612 Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Mon, 18 Mar 2024 01:11:19 +1100 Subject: [PATCH] Added login form main --- app/app/components/Login/Login.tsx | 47 ++++++++++++++++++++++++++++++ app/app/routes/login.tsx | 21 +++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 app/app/components/Login/Login.tsx create mode 100644 app/app/routes/login.tsx diff --git a/app/app/components/Login/Login.tsx b/app/app/components/Login/Login.tsx new file mode 100644 index 0000000..0d08151 --- /dev/null +++ b/app/app/components/Login/Login.tsx @@ -0,0 +1,47 @@ +import React, { useState } from "react" +import { Flex, FormControl, Input } from "@chakra-ui/react" + +export const Login = (props) => { + const [email, setEmail] = useState("") + const [password, setPassword] = useState("") + + const handleLogin = () => { + // handle login + } + + return ( + <> + + + setEmail(e.target.value)} + placeholder="Email" + type="email" + value={email} + /> + + + + setPassword(e.target.value)} + placeholder="Password" + type="password" + value={password} + /> + + + + Login + + + + ) +} diff --git a/app/app/routes/login.tsx b/app/app/routes/login.tsx new file mode 100644 index 0000000..1d2fadb --- /dev/null +++ b/app/app/routes/login.tsx @@ -0,0 +1,21 @@ +import { Flex } from "@chakra-ui/react" + +import { Login } from "~/components/Login/Login" + +export default function login() { + const template = ( + <> + + + + + ) + + return template +}