diff --git a/src/app/signin/page.tsx b/src/app/signin/page.tsx new file mode 100644 index 0000000..81fe7fb --- /dev/null +++ b/src/app/signin/page.tsx @@ -0,0 +1,270 @@ +"use client"; + +import Link from "next/link"; +import { useState } from "react"; +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleCentered from "@/components/navbar/NavbarStyleCentered/NavbarStyleCentered"; +import HeroLogo from "@/components/sections/hero/HeroLogo"; +import FooterLogoEmphasis from "@/components/sections/footer/FooterLogoEmphasis"; +import { Mail, Github, Linkedin, Eye, EyeOff } from "lucide-react"; + +export default function SignInPage() { + const navItems = [ + { name: "Dashboard", id: "dashboard" }, + { name: "Features", id: "features" }, + { name: "Pricing", id: "pricing" }, + { name: "FAQ", id: "faq" }, + { name: "Contact", id: "contact" }, + { name: "Sign In", id: "/signin" }, + { name: "Sign Up", id: "/signup" }, + ]; + + const footerColumns = [ + { + items: [ + { label: "Dashboard", href: "/dashboard" }, + { label: "Applications", href: "/applications" }, + { label: "Interview Prep", href: "/interview-prep" }, + { label: "Settings", href: "/settings" }, + ], + }, + { + items: [ + { label: "Pricing", href: "/pricing" }, + { label: "Features", href: "#features" }, + { label: "FAQ", href: "#faq" }, + { label: "Blog", href: "/blog" }, + ], + }, + { + items: [ + { label: "About Us", href: "/about" }, + { label: "Contact", href: "/contact" }, + { label: "Support", href: "/support" }, + { label: "Status", href: "https://status.trakapply.com" }, + ], + }, + { + items: [ + { label: "Privacy Policy", href: "/privacy" }, + { label: "Terms of Service", href: "/terms" }, + { label: "Cookie Policy", href: "/cookies" }, + { label: "Accessibility", href: "/accessibility" }, + ], + }, + { + items: [ + { label: "Twitter", href: "https://twitter.com/trakapply" }, + { label: "LinkedIn", href: "https://linkedin.com/company/trakapply" }, + { label: "Instagram", href: "https://instagram.com/trakapply" }, + { label: "Discord", href: "https://discord.gg/trakapply" }, + ], + }, + ]; + + const [showPassword, setShowPassword] = useState(false); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + const [errors, setErrors] = useState<{ email?: string; password?: string }>({}); + const [loading, setLoading] = useState(false); + + const validateEmail = (value: string) => { + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; + return emailRegex.test(value); + }; + + const handleSubmit = (e: React.FormEvent) => { + e.preventDefault(); + const newErrors: { email?: string; password?: string } = {}; + + if (!email.trim()) { + newErrors.email = "Email is required"; + } else if (!validateEmail(email)) { + newErrors.email = "Please enter a valid email"; + } + + if (!password.trim()) { + newErrors.password = "Password is required"; + } else if (password.length < 6) { + newErrors.password = "Password must be at least 6 characters"; + } + + setErrors(newErrors); + + if (Object.keys(newErrors).length === 0) { + setLoading(true); + setTimeout(() => { + setLoading(false); + console.log("Sign in submitted", { email, password }); + }, 1500); + } + }; + + return ( + + + +
+ +
+ +
+
+
+

+ Sign In +

+

+ Access your TrakApply dashboard +

+ + {/* OAuth Options */} +
+ + + +
+ + {/* Divider */} +
+
+
+
+
+ Or continue with email +
+
+ + {/* Email/Password Form */} +
+
+ + { + setEmail(e.target.value); + if (errors.email) setErrors({ ...errors, email: undefined }); + }} + placeholder="you@example.com" + className={`w-full px-4 py-3 rounded-lg border ${ + errors.email ? "border-red-500" : "border-gray-300" + } focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all`} + /> + {errors.email && ( +

{errors.email}

+ )} +
+ +
+ +
+ { + setPassword(e.target.value); + if (errors.password) setErrors({ ...errors, password: undefined }); + }} + placeholder="Enter your password" + className={`w-full px-4 py-3 pr-12 rounded-lg border ${ + errors.password ? "border-red-500" : "border-gray-300" + } focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all`} + /> + +
+ {errors.password && ( +

{errors.password}

+ )} +
+ +
+ + + Forgot password? + +
+ + +
+ + {/* Sign Up Link */} +

+ Don't have an account?{" "} + + Create one + +

+
+
+
+ + +
+ ); +}