Comments, appointments adjustments, fixed some issues
This commit is contained in:
@@ -20,6 +20,8 @@ function resolveNextPath(candidate) {
|
||||
return candidate;
|
||||
}
|
||||
|
||||
//Registration page
|
||||
//Collects user details, checks passwords match, then creates an account
|
||||
function RegisterPage() {
|
||||
const {register} = useAuth();
|
||||
const router = useRouter();
|
||||
@@ -38,10 +40,12 @@ function RegisterPage() {
|
||||
const [error, setError] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
//Updates a single field in the form state
|
||||
function handleChange(e) {
|
||||
setForm((prev) => ({ ...prev, [e.target.name]: e.target.value }));
|
||||
}
|
||||
|
||||
//Validates passwords match then submits the registration form
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
setError("");
|
||||
|
||||
Reference in New Issue
Block a user