Skip to content

Commit

Permalink
Added ReCAPTCHA form component to Studnet Dorms form
Browse files Browse the repository at this point in the history
  • Loading branch information
MocicaRazvan committed Jan 20, 2024
1 parent f6ccc48 commit 4f14ebd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/forms/dorms/DormsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import AgreeToTermsForm from "../reusable/AgreeToTermsForm";
import AgreeEuPlatescForm from "../reusable/AgreeEuPlatesc";
import SubmitButton from "../reusable/SubmitButton";
import { sumbitDorm } from "@/actions/forms";
import ReCAPTCHAForm from "../reusable/ReCAPTCHAForm";

/**
* `DormsForm` is a React component for handling the studnent dorm form.
Expand Down Expand Up @@ -49,6 +50,7 @@ export default function DormsForm({
submitTexts,
acceptEuPlatescTexts,
monthTexts,
recaptchaTexts,
}: Props) {
const methods = useForm<DormFormInput>({
defaultValues: {
Expand All @@ -66,6 +68,7 @@ export default function DormsForm({
tax: "",
month: "",
amount: 0,
recaptcha: "",
},
});
const {
Expand Down Expand Up @@ -98,6 +101,7 @@ export default function DormsForm({
<PersonalDetailsForm {...personalTexts} />
<AgreeToTermsForm {...agreeTexts} />
<AgreeEuPlatescForm {...acceptEuPlatescTexts} />
<ReCAPTCHAForm<DormFormInput> control={control} {...recaptchaTexts} />
<div className="col-span-2 w-full text-center flex items-center justify-center">
<SubmitButton isSubmitting={isSubmitting} {...submitTexts} />
</div>
Expand Down

0 comments on commit 4f14ebd

Please sign in to comment.