Memo for shorcuts

This commit is contained in:
Lim Chee Aun 2023-10-22 19:24:59 +08:00
parent ddc8c1e9d9
commit a6cdd0a01a

View file

@ -1,6 +1,7 @@
import './shortcuts.css';
import { Menu, MenuItem } from '@szhsin/react-menu';
import { memo } from 'preact/compat';
import { useMemo, useRef } from 'preact/hooks';
import { useHotkeys } from 'react-hotkeys-hook';
import { useNavigate } from 'react-router-dom';
@ -186,4 +187,4 @@ function Shortcuts() {
);
}
export default Shortcuts;
export default memo(Shortcuts);