From e28665f4cbf7e0893c69461edd468c0f13920153 Mon Sep 17 00:00:00 2001 From: bender Date: Sat, 7 Mar 2026 08:25:21 +0000 Subject: [PATCH] Update src/app/login/page.tsx --- src/app/login/page.tsx | 300 +++++++++++++++++++++++++---------------- 1 file changed, 184 insertions(+), 116 deletions(-) diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 3a4ae7a..e524abe 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,11 +1,18 @@ "use client"; +import { useState } from "react"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleApple from "@/components/navbar/NavbarStyleApple/NavbarStyleApple"; -import FooterSimple from "@/components/sections/footer/FooterSimple"; -import Link from "next/link"; +import { Lock, Mail, Eye, EyeOff, Zap, AlertCircle } from "lucide-react"; export default function LoginPage() { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [showPassword, setShowPassword] = useState(false); + const [isLoading, setIsLoading] = useState(false); + const [error, setError] = useState(""); + const [focusedField, setFocusedField] = useState(null); + const navItems = [ { name: "Home", id: "/" }, { name: "Features", id: "#features" }, @@ -14,44 +21,38 @@ export default function LoginPage() { { name: "Sign Up", id: "https://example.com/signup" }, ]; - const footerColumns = [ - { - title: "Product", - items: [ - { label: "Features", href: "#features" }, - { label: "Security", href: "#metrics" }, - { label: "Pricing", href: "#" }, - { label: "Documentation", href: "#" }, - ], - }, - { - title: "Company", - items: [ - { label: "About Us", href: "#" }, - { label: "Blog", href: "#" }, - { label: "Careers", href: "#" }, - { label: "Contact", href: "#" }, - ], - }, - { - title: "Resources", - items: [ - { label: "API Docs", href: "#" }, - { label: "Security Guide", href: "#" }, - { label: "FAQ", href: "#faq" }, - { label: "Status", href: "#" }, - ], - }, - { - title: "Legal", - items: [ - { label: "Privacy Policy", href: "#" }, - { label: "Terms of Service", href: "#" }, - { label: "Cookie Policy", href: "#" }, - { label: "Compliance", href: "#" }, - ], - }, - ]; + const handleLogin = async (e: React.FormEvent) => { + e.preventDefault(); + setError(""); + setIsLoading(true); + + try { + if (!email || !password) { + setError("Please fill in all fields"); + return; + } + + if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) { + setError("Please enter a valid email address"); + return; + } + + if (password.length < 8) { + setError("Password must be at least 8 characters"); + return; + } + + // Simulate API call with delay + await new Promise((resolve) => setTimeout(resolve, 2000)); + + // Redirect to verify OTP page + window.location.href = "/verify-otp"; + } catch (err) { + setError("Login failed. Please try again."); + } finally { + setIsLoading(false); + } + }; return ( -
-
-
-

Sign In

-

Access your secure account

+
+ {/* Animated background grid */} +
+
+
+
+
+
-
-
-