1
0
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:
Alex Andreev 2021-10-19 13:18:52 +03:00
parent c7949fe221
commit 6236eab29f
2 changed files with 3 additions and 3 deletions

View File

@ -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"/>}
/>
);

View File

@ -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));