1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Clean up in hotbar entity icon

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2023-03-16 16:18:45 +03:00
parent 8a70b5c7d9
commit 7e6e6976eb

View File

@ -95,17 +95,6 @@ class NonInjectedHotbarEntityIcon extends React.Component<HotbarEntityIconProps
});
}
get entityBackground() {
const { entity, getClusterById } = this.props;
const cluster = getClusterById(entity.metadata.uid);
if (cluster) {
return cluster.preferences?.iconBackgroundColor;
}
return entity.spec.icon?.background;
}
render() {
const { entity, className, onClick } = this.props;
@ -116,7 +105,7 @@ class NonInjectedHotbarEntityIcon extends React.Component<HotbarEntityIconProps
source={entity.metadata.source}
src={entity.spec.icon?.src}
material={entity.spec.icon?.material}
background={this.entityBackground}
background={entity.spec.icon?.background}
className={className}
active={this.isActive(entity)}
onMenuOpen={() => this.onMenuOpen()}