Update form to include full name for signup and proper handlers
cgen-16265738c08540a2ad74cf5acdfd117c
This commit is contained in:
parent
21858635da
commit
a082a1a71e
1 changed files with 29 additions and 3 deletions
|
|
@ -172,13 +172,33 @@ export default function Login() {
|
|||
</div>
|
||||
|
||||
{/* Email/Password Form */}
|
||||
<form onSubmit={handleLogin} className="space-y-4">
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
{isSignUp && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="fullName" className="text-sm font-medium">
|
||||
Full Name
|
||||
</Label>
|
||||
<div className="relative">
|
||||
<User className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
||||
<Input
|
||||
id="fullName"
|
||||
type="text"
|
||||
value={fullName}
|
||||
onChange={(e) => setFullName(e.target.value)}
|
||||
placeholder="Enter your full name"
|
||||
className="pl-10 bg-background/50 border-border/50 focus:border-aethex-400"
|
||||
required={isSignUp}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="email" className="text-sm font-medium">
|
||||
Email Address
|
||||
</Label>
|
||||
<div className="relative">
|
||||
<User className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
||||
<Mail className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
|
|
@ -202,11 +222,17 @@ export default function Login() {
|
|||
type="password"
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Enter your password"
|
||||
placeholder={isSignUp ? "Create a password" : "Enter your password"}
|
||||
className="pl-10 bg-background/50 border-border/50 focus:border-aethex-400"
|
||||
required
|
||||
minLength={isSignUp ? 6 : undefined}
|
||||
/>
|
||||
</div>
|
||||
{isSignUp && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Password must be at least 6 characters long
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between text-sm">
|
||||
|
|
|
|||
Loading…
Reference in a new issue