diff --git a/src/app/registration/_pages/NewUoaPage.tsx b/src/app/registration/_pages/NewUoaPage.tsx index bc4603b..4be9c6d 100644 --- a/src/app/registration/_pages/NewUoaPage.tsx +++ b/src/app/registration/_pages/NewUoaPage.tsx @@ -2,18 +2,14 @@ import { useFormError } from "../RegistrationForm"; import { RegistrationDraft } from "../types"; - -import { useRef } from "react"; +import { MAX_MAJORS } from "@/domain/member/constants"; export function NewUoaPage({ fields }: { fields: Partial }) { const state = useFormError(); const errorFields = state?.fields; const field = errorFields ?? fields; - /* Client JS enhancement: - * Used to create a reference to the Other checkbox so it automatically checks when user enters text - */ - const otherFacultyCheckboxRef = useRef(null); + const majorCount = Math.min(field?.majorCount ?? 1, MAX_MAJORS); return ( <> @@ -136,41 +132,36 @@ export function NewUoaPage({ fields }: { fields: Partial }) { /> Auckland Bioengineering Institute + + -