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
+9 -1
View File
@@ -28,6 +28,8 @@ import createAdminStore from './store/createAdminStore'
import { i18nProvider } from './i18n'
import config from './config'
import { setDispatch, startEventStream } from './eventStream'
import { HotKeys } from 'react-hotkeys'
import { keyMap } from './hotkeys'
const history = createHashHistory()
@@ -119,4 +121,10 @@ const Admin = (props) => {
)
}
export default App
const AppWithHotkeys = () => (
<HotKeys keyMap={keyMap}>
<App />
</HotKeys>
)
export default AppWithHotkeys