From 371914fbe78621d9b8d8eb39d4700743e63a35b4 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 8 Jul 2021 15:49:59 -0400 Subject: [PATCH] Fix onRun not executing everywhere :hover is defined for HotbarIcon Signed-off-by: Sebastian Malton --- .../components/hotbar/hotbar-icon.tsx | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/renderer/components/hotbar/hotbar-icon.tsx b/src/renderer/components/hotbar/hotbar-icon.tsx index b8447baf80..176abcc996 100644 --- a/src/renderer/components/hotbar/hotbar-icon.tsx +++ b/src/renderer/components/hotbar/hotbar-icon.tsx @@ -74,32 +74,28 @@ export const HotbarIcon = observer(({menuItems = [], size = 40, tooltip, ...prop setMenuOpen(!menuOpen); }; - const renderIcon = () => { - return ( - 0 })}> + {tooltip && {tooltip}} +
{ if (!disabled) { onClick?.(event); } }} > - {material && } - - ); - }; - - return ( -
0 })}> - {tooltip && {tooltip}} -
- {renderIcon()} + + {material && } + {children}