fixes
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
"use client"
|
||||
|
||||
import { Register } from "@/actions/auth";
|
||||
import Header from "@/components/header";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "@/components/ui/field";
|
||||
@@ -13,7 +12,8 @@ import { useRouter } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { Sex } from "@/types";
|
||||
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
|
||||
import { ArrowLeft, ArrowRight, Check } from "lucide-react";
|
||||
import { ArrowLeft, ArrowRight } from "lucide-react";
|
||||
import { registerUser } from "@/actions/auth";
|
||||
|
||||
interface FormData {
|
||||
email: string;
|
||||
@@ -34,7 +34,7 @@ export default function RegisterPage() {
|
||||
const onSubmit: SubmitHandler<FormData> = async (data) => {
|
||||
setError(null);
|
||||
|
||||
const result = await Register(data.email, data.password, data.first_name, data.second_name, data.sex);
|
||||
const result = await registerUser(data.email, data.password, data.first_name, data.second_name, data.sex);
|
||||
if (!result.success) {
|
||||
setError(result.message ?? null);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user