Skip to content

Commit

Permalink
fixes issue with variables not working
Browse files Browse the repository at this point in the history
  • Loading branch information
CarinaWolli committed Aug 15, 2022
1 parent 4ce6b91 commit bcb8ab4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>`;
Expand Down

0 comments on commit bcb8ab4

Please sign in to comment.