"use client";
import { useState } from "react";
import { BrandLogo } from "@/components/brand-logo";
function GoogleIcon() {
return (
);
}
export default function RegisterPage() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [name, setName] = useState("");
const [error, setError] = useState("");
async function submit(e: React.FormEvent) {
e.preventDefault();
setError("");
const res = await fetch("/api/auth/register", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ email, password, name }) });
if (!res.ok) {
setError("Kayıt başarısız. E-posta kullanılıyor olabilir veya seed çalışmamış olabilir.");
return;
}
location.href = "/dashboard/ads";
}
return (
);
}