Modified how template list is generated to be a function to allow checking whether the templates can be printed.
This commit is contained in:
@@ -36,7 +36,6 @@ export function ShopTemplateTestRender({
|
||||
emailEditorRef.current.exportHtml(async (data) => {
|
||||
inlineCss(data.html, {
|
||||
url: `${window.location.protocol}://${window.location.host}/`,
|
||||
removeLinkTags: false,
|
||||
}).then(async function (inlineHtml) {
|
||||
try {
|
||||
const { data: contextData } = await client.query({
|
||||
@@ -65,8 +64,10 @@ export function ShopTemplateTestRender({
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={style}>
|
||||
<Editor value={variables} onChange={(e) => setVariables(e)} />
|
||||
<div style={{ ...style, margin: "1rem", display: "flex" }}>
|
||||
<div style={{ flex: 1 }}>
|
||||
<Editor value={variables} onChange={(e) => setVariables(e)} />
|
||||
</div>
|
||||
<Button loading={loading} type="ghost" onClick={handleTestRender}>
|
||||
{t("bodyshop.actions.testrender")}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user