mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Cleaning up by comments in #3810
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
c7949fe221
commit
6236eab29f
@ -98,8 +98,8 @@ export class CatalogEntityDrawerMenu<T extends CatalogEntity> extends React.Comp
|
||||
<HotbarToggleMenuItem
|
||||
key="hotbar-toggle"
|
||||
entity={entity}
|
||||
addContent={<Icon material="push_pin" small tooltip={"Add to Hotbar"}/>}
|
||||
removeContent={<Icon material="keep_off" small tooltip={"Remove from Hotbar"}/>}
|
||||
addContent={<Icon material="push_pin" small tooltip="Add to Hotbar"/>}
|
||||
removeContent={<Icon material="keep_off" small tooltip="Remove from Hotbar"/>}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ import { MenuItem } from "../menu";
|
||||
import type { CatalogEntity } from "../../api/catalog-entity";
|
||||
|
||||
export function HotbarToggleMenuItem(props: { entity: CatalogEntity, addContent: ReactNode, removeContent: ReactNode }) {
|
||||
const store = HotbarStore.getInstance(false);
|
||||
const store = HotbarStore.getInstance();
|
||||
const add = () => store.addToHotbar(props.entity);
|
||||
const remove = () => store.removeFromHotbar(props.entity.getId());
|
||||
const [itemInHotbar, setItemInHotbar] = useState(store.isAddedToActive(props.entity));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user