Modified how template list is generated to be a function to allow checking whether the templates can be printed.
This commit is contained in:
@@ -72,7 +72,7 @@ export function ShopTemplateAddComponent({
|
||||
<Menu onClick={handleAdd}>
|
||||
{availableTemplateKeys.length > 0 ? (
|
||||
availableTemplateKeys.map((tkey) => (
|
||||
<Menu.Item key={tkey}>{TemplateList[tkey].title}</Menu.Item>
|
||||
<Menu.Item key={tkey}>{TemplateList()[tkey].title}</Menu.Item>
|
||||
))
|
||||
) : (
|
||||
<div>{t("bodyshop.labels.notemplatesavailable")}</div>
|
||||
|
||||
Reference in New Issue
Block a user