From 6290f6bffa648ee8d794e5ca1c208f767c19e904 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 19 Aug 2025 19:58:29 +0700 Subject: [PATCH] :sparkles: create new login page create all UI components on the login page, including the header, login form, and OAuth selection --- features/auth/ui/EmailInput.tsx | 26 +++++++++++++++++ features/auth/ui/Login.tsx | 37 +++++++++++++++++++++++- features/auth/ui/OAuthProviders.tsx | 45 +++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 features/auth/ui/EmailInput.tsx create mode 100644 features/auth/ui/OAuthProviders.tsx diff --git a/features/auth/ui/EmailInput.tsx b/features/auth/ui/EmailInput.tsx new file mode 100644 index 0000000..053f5ef --- /dev/null +++ b/features/auth/ui/EmailInput.tsx @@ -0,0 +1,26 @@ +"use client"; + +import { Button, Input } from "@heroui/react"; +import React from "react"; + +const EmailInput = () => { + return ( + <> + + + + ); +}; + +export default EmailInput; diff --git a/features/auth/ui/Login.tsx b/features/auth/ui/Login.tsx index 667db12..f64bbdf 100644 --- a/features/auth/ui/Login.tsx +++ b/features/auth/ui/Login.tsx @@ -1,7 +1,42 @@ +"use client"; + import React from "react"; +import EmailInput from "./EmailInput"; +import { Divider, Link } from "@heroui/react"; +import { routes } from "@/shared/config/routes"; +import OAuthProviders from "./OAuthProviders"; const Login = () => { - return
This is login flow
; + return ( +
+
Welcome back
+ + {/* Email form */} +
+ +
+ + {/* Sign up link */} +

+ Don't have an account?{" "} + + Sign Up + +

+ + {/* Divider between email form and third-party login options */} +
+ + or + +
+ + {/* Buttons for third-party login options */} +
+ +
+
+ ); }; export default Login; diff --git a/features/auth/ui/OAuthProviders.tsx b/features/auth/ui/OAuthProviders.tsx new file mode 100644 index 0000000..a351f03 --- /dev/null +++ b/features/auth/ui/OAuthProviders.tsx @@ -0,0 +1,45 @@ +import { Button } from "@heroui/react"; +import { Icon } from "@iconify/react"; +import React from "react"; + +const OAuthProviders = () => { + // set to true if there are other providers coming soon + const comingSoonProviders: boolean = true; + + // Provider for third-party auth + const oAuthProviders = [ + { + name: "Google", + icon: "logos:google-icon", + }, + { + name: "Discord", + icon: "logos:discord-icon", + }, + ]; + + return ( +
+ {oAuthProviders.map((provider, index) => { + return ( + + ); + })} + + {comingSoonProviders && ( + + )} +
+ ); +}; + +export default OAuthProviders;