Upgrade to webpack@5 (#4894)

This commit is contained in:
Roman authored and GitHub committed 2022-02-25 10:20:06 -05:00
1 parent 8524f9d244
commit ff55719ffa
56 files changed
+5550 -18933

No files matched your search

@@ -25,7 +25,7 @@ interface Props<T extends CatalogEntity> {
@observer
export class CatalogEntityDetails<T extends CatalogEntity> extends Component<Props<T>> {
categoryIcon(category: CatalogCategory) {
if (category.metadata.icon.includes("<svg")) {
if (Icon.isSvg(category.metadata.icon)) {
return <Icon svg={category.metadata.icon} smallest />;
} else {
return <Icon material={category.metadata.icon} smallest />;
@@ -65,7 +65,7 @@ export class CatalogEntityDrawerMenu<T extends CatalogEntity> extends React.Comp
continue;
}
const key = menuItem.icon.includes("<svg") ? "svg" : "material";
const key = Icon.isSvg(menuItem.icon) ? "svg" : "material";
items.push(
<MenuItem key={menuItem.title} onClick={() => this.onMenuItemClick(menuItem)}>
@@ -28,7 +28,7 @@ function getCategoryIcon(category: CatalogCategory) {
const { icon } = category.metadata ?? {};
if (typeof icon === "string") {
return icon.includes("<svg")
return Icon.isSvg(icon)
? <Icon small svg={icon}/>
: <Icon small material={icon}/>;
}