Skip to content

Commit

Permalink
fix: use uppercased countryregion for non-fetch submission
Browse files Browse the repository at this point in the history
  • Loading branch information
tshuli committed Aug 1, 2023
1 parent e3e1c9c commit 689b630
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/features/public-form/PublicFormProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,13 @@ export const PublicFormProvider = ({

return (
submitEmailModeFormMutation
.mutateAsync(formData, { onSuccess })
.mutateAsync(
{
...formData,
formInputs: formInputsWithCountryRegionInUpperCase,
},
{ onSuccess },
)
// Using catch since we are using mutateAsync and react-hook-form will continue bubbling this up.
.catch(async (error) => {
// TODO(#5826): Remove when we have resolved the Network Error
Expand Down Expand Up @@ -510,6 +516,7 @@ export const PublicFormProvider = ({
.mutateAsync(
{
...formData,
formInputs: formInputsWithCountryRegionInUpperCase,
publicKey: form.publicKey,
captchaResponse,
captchaType,
Expand Down

0 comments on commit 689b630

Please sign in to comment.