Skip to content

Commit

Permalink
fix: address reCaptcha verification and settings update issues (#3542)
Browse files Browse the repository at this point in the history
  • Loading branch information
neatbyte-vnobis committed Sep 21, 2023
1 parent a239a47 commit 0880ce2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,8 @@ export const createSubmissionsCrud = (params: CreateSubmissionsCrudParams): Subm
"https://www.google.com/recaptcha/api/siteverify",
{
method: "POST",
body: JSON.stringify({
secret: secretKey,
response: reCaptchaResponseToken
})
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: `secret=${secretKey}&response=${reCaptchaResponseToken}`
}
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const FormsSettings: React.FC = () => {
const [updateSettings, updateSettingsMutation] = useMutation<
UpdateFormSettingsMutationResponse,
UpdateFormSettingsMutationVariables
>(graphql.mutation);
>(graphql.mutation, { refetchQueries: [{ query: graphql.query }] });
const mutationInProgress = updateSettingsMutation?.loading;

return (
Expand Down

0 comments on commit 0880ce2

Please sign in to comment.