'use client' import { useActionState } from 'react' import Link from 'next/link' import { register, type AuthFormState } from '../actions' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card' import { AlertTriangle, Loader2 } from 'lucide-react' export default function RegisterPage() { const [state, formAction, pending] = useActionState( register, {} ) return (
Hesap Oluştur Bilgilerinizi girerek kayıt olun
{state.error && (
{state.error}
)} {state.success && (
{state.message ?? 'Kayıt başarılı. Lütfen giriş yapın.'}
)}
Zaten hesabınız var mı?  Giriş Yap
) }