import NextResponse from 'next/server'; import z from 'zod'; import bcrypt from 'bcryptjs';
Instead of just sending them to a blank dashboard, check their email domain.
;
<div className="text-center"> <h1 className="text-2xl font-bold text-white">Create Nyle Account</h1> <p className="text-neutral-400 mt-2 text-sm">Start building workflows for free.</p> </div>
A clean, client-side component with state management and loading states. register for nyle
try const res = await fetch('/api/auth/register', method: 'POST', headers: 'Content-Type': 'application/json' , body: JSON.stringify(formData), );
// 3. Check if user exists const existingUser = users.find(u => u.email === email); if (existingUser) return NextResponse.json( message: "User with this email already exists" , status: 409 ); import NextResponse from 'next/server'; import z from 'zod';
return NextResponse.json( message: "Internal Server Error" , status: 500 );
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => setFormData( ...formData, [e.target.name]: e.target.value ); ; Check if user exists const existingUser = users
<div className="space-y-2"> <label className="text-sm text-neutral-300">Full Name</label> <input name="name" type="text" required value=formData.name onChange=handleChange className="w-full px-4 py-3 bg-neutral-800 border border-neutral-700 rounded-lg text-white focus:ring-2 focus:ring-indigo-500 outline-none transition" placeholder="Jane Doe" /> </div>
Once you have finished all segments of the NYLC, you can apply for the exam through your official account on the New York State Board of Law Examiners (BOLE) Website .