Modified how template list is generated to be a function to allow checking whether the templates can be printed.

This commit is contained in:
Patrick Fic
2020-09-11 14:43:04 -07:00
parent 984c001bd8
commit f7e74c5043
20 changed files with 167 additions and 207 deletions

View File

@@ -38,11 +38,6 @@ export default function ShopTemplateEditorComponent({
return (
<div>
<ShopTemplateEditorSaveButton
templateId={templateId}
gql={editorContent.gql}
emailEditorRef={emailEditorRef}
/>
<EmailEditor
style={{ width: "100%" }}
ref={emailEditorRef}
@@ -63,7 +58,7 @@ export default function ShopTemplateEditorComponent({
],
}}
/>
<div style={{ display: "flex", width: "90vw" }}>
<div style={{ display: "flex", width: "90vw", margin: "2rem" }}>
<CmEditor
style={{ flex: 1 }}
value={editorContent.gql}
@@ -86,6 +81,11 @@ export default function ShopTemplateEditorComponent({
query={editorContent.gql}
emailEditorRef={emailEditorRef}
/>
<ShopTemplateEditorSaveButton
templateId={templateId}
gql={editorContent.gql}
emailEditorRef={emailEditorRef}
/>
</div>
</div>
);