From d52c4c39992b2ca4f909886b21bcfe8f145679e9 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Wed, 21 Jul 2021 08:08:39 -0400 Subject: [PATCH] Fix onRun not executing everywhere :hover is defined for HotbarIcon (#3316) 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}