Added template previewing with non-functional GQL editor BOD-126

This commit is contained in:
Patrick Fic
2020-09-03 16:14:30 -07:00
parent f4fed87f61
commit 051be83303
16 changed files with 50580 additions and 40 deletions

View File

@@ -16,7 +16,7 @@ export default function ShopTemplatesListContainer() {
const { t } = useTranslation();
const search = queryString.parse(useLocation().search);
const history = useHistory();
if (error) return <AlertComponent message={error.message} type='error' />;
if (error) return <AlertComponent message={error.message} type="error" />;
const handleEdit = (record) => {
if (record) {
@@ -39,7 +39,7 @@ export default function ShopTemplatesListContainer() {
/>
<List
loading={loading}
itemLayout='horizontal'
itemLayout="horizontal"
dataSource={data ? data.templates : []}
renderItem={(item) => (
<List.Item
@@ -51,12 +51,13 @@ export default function ShopTemplatesListContainer() {
templateId={item.id}
refetch={refetch}
/>,
]}>
]}
>
<Skeleton title={false} loading={item.loading} active>
<List.Item.Meta
title={TemplateList[item.name].title}
description={TemplateList[item.name].description}
/>
<div style={{ display: "flex", flexDirection: "column" }}>
<div>{TemplateList[item.name].title}</div>
<div>{TemplateList[item.name].description}</div>
</div>
</Skeleton>
</List.Item>
)}