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

Wrapping HotbarStore.getInstance() into a function

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-10-11 11:19:25 +03:00
parent 2f1d32b47e
commit c5840e4293

View File

@ -102,7 +102,9 @@ export class CatalogEntityDrawerMenu<T extends CatalogEntity> extends React.Comp
);
}
if (!HotbarStore.getInstance().isAddedToActive(entity)) {
const isAddedEntity = () => HotbarStore.getInstance().isAddedToActive(entity);
if (!isAddedEntity) {
items.push(
<MenuItem key="add-to-hotbar" onClick={() => this.addToHotbar(entity) }>
<Icon material="push_pin" small tooltip="Add to Hotbar" />