fixes issue with variables not working (#3859)

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
pull/3864/head
Carina Wollendorfer 2022-08-15 18:32:11 -04:00 committed by GitHub
parent 8c7579fede
commit 497d4902af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 9 deletions

View File

@ -9,13 +9,13 @@ interface IAddVariablesDropdown {
}
const variables = [
"event_name_workflow",
"organizer_name_workflow",
"attendee_name_workflow",
"event_date_workflow",
"event_time_workflow",
"location_workflow",
"additional_notes_workflow",
"event_name",
"organizer_name",
"attendee_name",
"event_date",
"event_time",
"location",
"additional_notes",
];
export const AddVariablesDropdown = (props: IAddVariablesDropdown) => {
@ -39,7 +39,7 @@ export const AddVariablesDropdown = (props: IAddVariablesDropdown) => {
type="button"
className="px-5 py-1"
onClick={() => props.addVariable(props.isEmailSubject, variable)}>
{t(variable)}
{t(`${variable}_workflow`)}
</button>
</DropdownMenuItem>
))}

View File

@ -81,7 +81,6 @@ const customTemplate = async (text: string, variables: VariablesType, locale: st
}
});
}
dynamicText = dynamicText.replace(`{${variable}}`, "");
});
const textHtml = `<body style="white-space: pre-wrap;">${dynamicText}</body>`;