|
| 1 | +'use client'; |
| 2 | +import { useState } from 'react'; |
| 3 | +import { Button } from '@/components/ui/button'; |
| 4 | +import { Checkbox } from '@/components/ui/checkbox'; |
| 5 | +import { Input } from '@/components/ui/input'; |
| 6 | +import { GithubIcon } from 'lucide-react'; |
| 7 | +import Link from 'next/link'; |
| 8 | + |
| 9 | +export default function SignUpPage() { |
| 10 | + const [email, setEmail] = useState(''); |
| 11 | + const [password, setPassword] = useState(''); |
| 12 | + const [confirmPassword, setConfirmPassword] = useState(''); |
| 13 | + const [agreeTerms, setAgreeTerms] = useState(false); |
| 14 | + |
| 15 | + return ( |
| 16 | + <div className="flex min-h-screen items-center justify-center bg-gray-900"> |
| 17 | + <div className="w-full max-w-md space-y-6 rounded-lg bg-gray-800 p-8 shadow-xl"> |
| 18 | + <div className="text-center"> |
| 19 | + <h2 className="text-3xl font-bold text-white">Create your account</h2> |
| 20 | + <p className="text-sm text-gray-400"> |
| 21 | + Or |
| 22 | + <span className="mx-1" /> |
| 23 | + <Link href="/signin" className="text-blue-500 hover:underline"> |
| 24 | + Sign in to your existing account |
| 25 | + </Link> |
| 26 | + </p> |
| 27 | + </div> |
| 28 | + <form className="space-y-4"> |
| 29 | + <div> |
| 30 | + <Input |
| 31 | + type="email" |
| 32 | + placeholder="Email address" |
| 33 | + value={email} |
| 34 | + onChange={(e) => setEmail(e.target.value)} |
| 35 | + className="w-full rounded-md border border-gray-600 bg-gray-700 px-3 py-2 text-sm text-white placeholder-gray-400 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" |
| 36 | + /> |
| 37 | + </div> |
| 38 | + <div> |
| 39 | + <Input |
| 40 | + type="password" |
| 41 | + placeholder="Password" |
| 42 | + value={password} |
| 43 | + onChange={(e) => setPassword(e.target.value)} |
| 44 | + className="w-full rounded-md border border-gray-600 bg-gray-700 px-3 py-2 text-sm text-white placeholder-gray-400 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" |
| 45 | + /> |
| 46 | + </div> |
| 47 | + <div> |
| 48 | + <Input |
| 49 | + type="password" |
| 50 | + placeholder="Confirm password" |
| 51 | + value={confirmPassword} |
| 52 | + onChange={(e) => setConfirmPassword(e.target.value)} |
| 53 | + className="w-full rounded-md border border-gray-600 bg-gray-700 px-3 py-2 text-sm text-white placeholder-gray-400 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500" |
| 54 | + /> |
| 55 | + </div> |
| 56 | + <div className="flex items-center"> |
| 57 | + <Checkbox |
| 58 | + id="terms" |
| 59 | + checked={agreeTerms} |
| 60 | + onCheckedChange={(checked) => setAgreeTerms(checked as boolean)} |
| 61 | + className="rounded border-gray-600 text-blue-500 focus:ring-blue-500" |
| 62 | + /> |
| 63 | + <label htmlFor="terms" className="ml-2 text-sm text-gray-400"> |
| 64 | + I agree to the{' '} |
| 65 | + <Link href="#" className="text-blue-500 hover:underline"> |
| 66 | + Terms of Service |
| 67 | + </Link>{' '} |
| 68 | + and{' '} |
| 69 | + <Link href="#" className="text-blue-500 hover:underline"> |
| 70 | + Privacy Policy |
| 71 | + </Link> |
| 72 | + </label> |
| 73 | + </div> |
| 74 | + <Button className="w-full rounded-md bg-blue-600 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800"> |
| 75 | + Sign up |
| 76 | + </Button> |
| 77 | + </form> |
| 78 | + <div className="relative"> |
| 79 | + <div className="absolute inset-0 flex items-center"> |
| 80 | + <div className="w-full border-t border-gray-600"></div> |
| 81 | + </div> |
| 82 | + <div className="relative flex justify-center text-sm"> |
| 83 | + <span className="bg-gray-800 px-2 text-gray-400"> |
| 84 | + Or continue with |
| 85 | + </span> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + <div className="grid grid-cols-2 gap-3"> |
| 89 | + <Button |
| 90 | + variant="outline" |
| 91 | + className="rounded-md border border-gray-600 bg-gray-700 py-2 text-sm font-medium text-white hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800" |
| 92 | + > |
| 93 | + <GithubIcon className="mr-2 h-5 w-5" /> |
| 94 | + GitHub |
| 95 | + </Button> |
| 96 | + <Button |
| 97 | + variant="outline" |
| 98 | + className="rounded-md border border-gray-600 bg-gray-700 py-2 text-sm font-medium text-white hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-gray-800" |
| 99 | + > |
| 100 | + <svg className="mr-2 h-5 w-5" viewBox="0 0 24 24"> |
| 101 | + <path |
| 102 | + fill="currentColor" |
| 103 | + d="M12.545,10.239v3.821h5.445c-0.712,2.315-2.647,3.972-5.445,3.972c-3.332,0-6.033-2.701-6.033-6.032s2.701-6.032,6.033-6.032c1.498,0,2.866,0.549,3.921,1.453l2.814-2.814C17.503,2.988,15.139,2,12.545,2C7.021,2,2.543,6.477,2.543,12s4.478,10,10.002,10c8.396,0,10.249-7.85,9.426-11.748L12.545,10.239z" |
| 104 | + /> |
| 105 | + </svg> |
| 106 | + Google |
| 107 | + </Button> |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + </div> |
| 111 | + ); |
| 112 | +} |
0 commit comments