Before hook for onRun of Catalog entities (#3911)

Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
chhandSebastian Malton authored and GitHub committed 2021-10-05 15:36:44 -04:00
1 parent 851274d314
commit 4af796c532
17 files changed
+636 -128

No files matched your search

@@ -41,11 +41,15 @@ function getCategories() {
}
function getCategoryIcon(category: CatalogCategory) {
if (!category.metadata?.icon) return null;
const { icon } = category.metadata ?? {};
return category.metadata.icon.includes("<svg")
? <Icon small svg={category.metadata.icon}/>
: <Icon small material={category.metadata.icon}/>;
if (typeof icon === "string") {
return icon.includes("<svg")
? <Icon small svg={icon}/>
: <Icon small material={icon}/>;
}
return null;
}
function Item(props: TreeItemProps) {