This commit is contained in:
Giovanni Rezcjikov
2026-03-10 20:00:58 +03:00
parent d7615b4eb0
commit 77d429c8ba
31 changed files with 1098 additions and 504 deletions
+3 -3
View File
@@ -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;