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:
parent
2f1d32b47e
commit
c5840e4293
@ -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(
|
items.push(
|
||||||
<MenuItem key="add-to-hotbar" onClick={() => this.addToHotbar(entity) }>
|
<MenuItem key="add-to-hotbar" onClick={() => this.addToHotbar(entity) }>
|
||||||
<Icon material="push_pin" small tooltip="Add to Hotbar" />
|
<Icon material="push_pin" small tooltip="Add to Hotbar" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user