diff --git a/swe/components/registration-form.tsx b/swe/components/registration-form.tsx index 3d16807..7c7c621 100644 --- a/swe/components/registration-form.tsx +++ b/swe/components/registration-form.tsx @@ -5,21 +5,16 @@ import Input from "./input"; import InputSpacer from "./input-spacer"; import saveRegistrationForm from "@/lib/services/saveRegistrationFormService"; -const FormError = ({ errorMessage }: { errorMessage: string }) => { - return
{errorMessage}
; -}; - export interface Props { courses: Course[]; } export default function RegistrationForm({ courses }: Props) { - const { register, handleSubmit, setError, formState: { errors } } = useForm(); + const { register, handleSubmit } = useForm(); const onFormSubmission = async (data: any, event: any) => { try { await saveRegistrationForm(data); - event.target.reset(); } catch (err) { console.log(err); } @@ -30,45 +25,42 @@ export default function RegistrationForm({ courses }: Props) {