diff --git a/apps/console/src/pages/RegisterPage.tsx b/apps/console/src/pages/RegisterPage.tsx index 2dbc2f677..b89e4bfe0 100644 --- a/apps/console/src/pages/RegisterPage.tsx +++ b/apps/console/src/pages/RegisterPage.tsx @@ -11,6 +11,7 @@ import { useAuth } from "@/contexts/AuthContext"; export default function RegisterPage() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); + const [fullName, setFullName] = useState(""); const [isLoading, setIsLoading] = useState(false); const { toast } = useToast(); const navigate = useNavigate(); @@ -19,10 +20,10 @@ export default function RegisterPage() { const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); - if (!email || !password) { + if (!email || !password || !fullName) { toast({ title: "Error", - description: "Email and password are required", + description: "Full name, email, and password are required", variant: "destructive", }); return; @@ -37,7 +38,7 @@ export default function RegisterPage() { "Content-Type": "application/json", }, credentials: "include", - body: JSON.stringify({ email, password }), + body: JSON.stringify({ email, password, fullName }), }); if (!response.ok) { @@ -82,6 +83,18 @@ export default function RegisterPage() {