Temporary Demo Fixes
This commit is contained in:
@@ -36,6 +36,7 @@ export function EmailOverlayContainer({
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [sending, setSending] = useState(false);
|
||||
const [rawHtml, setRawHtml] = useState("");
|
||||
const defaultEmailFrom = {
|
||||
from: {
|
||||
name: bodyshop.shopname || EmailSettings.fromNameDefault,
|
||||
@@ -65,7 +66,11 @@ export function EmailOverlayContainer({
|
||||
|
||||
setSending(true);
|
||||
try {
|
||||
await axios.post("/sendemail", { ...messageOptions, attachments });
|
||||
await axios.post("/sendemail", {
|
||||
...messageOptions,
|
||||
html: rawHtml,
|
||||
attachments,
|
||||
});
|
||||
notification["success"]({ message: t("emails.successes.sent") });
|
||||
toggleEmailOverlayVisible();
|
||||
} catch (error) {
|
||||
@@ -115,6 +120,7 @@ export function EmailOverlayContainer({
|
||||
html: html,
|
||||
url: `${window.location.protocol}://${window.location.host}/`,
|
||||
});
|
||||
setRawHtml(response.data);
|
||||
|
||||
console.log("response", response);
|
||||
setMessageOptions({
|
||||
|
||||
Reference in New Issue
Block a user