Skip to content

Commit

Permalink
Ensure signature is properly saved and sent
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndpnt committed Mar 19, 2024
1 parent 0ac1479 commit fe6a3a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 4 additions & 6 deletions src/modules/Common/data-components/ContributorForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ const ContributorForm: React.FC<ContributorFormProps> = ({
const onSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();

if (onSubmitDocument) {
onSubmitDocument();
} else {
const { email, name } = (event.target as HTMLFormElement).elements as FormElements;
const { email, name } = (event.target as HTMLFormElement).elements as FormElements;

onChangeContributor({ email: email.value, name: name.value });
}
onChangeContributor({ email: email.value, name: name.value });

onSubmitDocument(name.value, email.value);
};

return (
Expand Down
7 changes: 4 additions & 3 deletions src/pages/service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ const ServicePage = ({

const onVerifyVersion = async () => showModal('version');

const onValidate = async () => {
const onValidate = async (name: string, email: string) => {
toggleLoading(true);

try {
const {
data: { url, message },
Expand All @@ -189,8 +190,8 @@ const ServicePage = ({
json: declaration,
name: declaration?.name,
documentType: documentType,
contributorName,
contributorEmail,
contributorName: name,
contributorEmail: email,
url: `${window.location.href}&expertMode=true`,
});

Expand Down

0 comments on commit fe6a3a2

Please sign in to comment.