remove unused hook effect

This commit is contained in:
timothycarambat 2025-06-13 14:35:50 -07:00
parent 3c89ea987f
commit 7d34ef426c

View File

@ -122,20 +122,9 @@ function useKeyboardShortcuts() {
// since some of the shortcuts are only available in multi-user mode as admin
const user = userFromStorage();
if (!!user && user?.role !== "admin") return;
function handleHelpEvent(e) {
setShowHelp(e.detail.show);
}
window.addEventListener(KEYBOARD_SHORTCUTS_HELP_EVENT, handleHelpEvent);
const cleanup = initKeyboardShortcuts();
return () => {
cleanup();
window.removeEventListener(
KEYBOARD_SHORTCUTS_HELP_EVENT,
handleHelpEvent
);
};
return () => cleanup();
}, []);
return;
}