This repository has been archived on 2025-07-07. You can view files and clone it, but cannot push or open issues or pull requests.
Files
eternos/frontend/style/components/register-form.tsx

72 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use client"
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import Link from "next/link"
export function RegisterForm() {
const [formData, setFormData] = useState({
email: "",
password: "",
confirmPassword: "",
})
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const { name, value } = e.target
setFormData(prev => ({ ...prev, [name]: value }))
}
const handleSubmit = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault()
// Here you would typically send the data to your backend
console.log("Form submitted:", formData)
}
return (
<form onSubmit={handleSubmit} className="space-y-4 max-w-md mx-auto">
<div>
<Label htmlFor="email">Email</Label>
<Input
type="email"
id="email"
name="email"
value={formData.email}
onChange={handleChange}
required
/>
</div>
<div>
<Label htmlFor="password">Пароль</Label>
<Input
type="password"
id="password"
name="password"
value={formData.password}
onChange={handleChange}
required
/>
</div>
<div>
<Label htmlFor="confirmPassword">Подтвердите пароль</Label>
<Input
type="password"
id="confirmPassword"
name="confirmPassword"
value={formData.confirmPassword}
onChange={handleChange}
required
/>
</div>
<Button type="submit" className="w-full">Зарегистрироваться</Button>
<div className="text-center">
<Link href="/recover-password" className="text-blue-600 hover:underline">
Забыли пароль?
</Link>
</div>
</form>
)
}