Simplify selecting zustand store state
This commit is contained in:
@@ -66,9 +66,7 @@ export const ReaderHotkeys = ({
|
||||
}) => {
|
||||
const readerThemeDirection = ReaderService.useGetThemeDirection();
|
||||
const { enableScope, disableScope } = useHotkeysContext();
|
||||
const { hotkeys } = useReaderSettingsStore((state) => ({
|
||||
hotkeys: state.hotkeys,
|
||||
}));
|
||||
const hotkeys = useReaderSettingsStore('hotkeys');
|
||||
const exitReader = ReaderService.useExit();
|
||||
|
||||
useHotkeys(hotkeys[ReaderHotkey.PREVIOUS_PAGE], () => ReaderControls.openPage('previous'));
|
||||
|
||||
Reference in New Issue
Block a user