Better hotkey organization

This commit is contained in:
Deluan
2021-02-03 18:29:33 -05:00
parent 22145e070f
commit a168f46b95
5 changed files with 29 additions and 23 deletions
+1 -2
View File
@@ -18,13 +18,12 @@ export default (props) => {
const classes = useStyles({ addPadding: queue.queue.length > 0 })
const dispatch = useDispatch()
const keyMap = { TOGGLE_MENU: 'm' }
const keyHandlers = {
TOGGLE_MENU: useCallback(() => dispatch(toggleSidebar()), [dispatch]),
}
return (
<HotKeys handlers={keyHandlers} keyMap={keyMap}>
<HotKeys handlers={keyHandlers}>
<Layout
{...props}
className={classes.root}