Merge branch 'develop' into feat/quick-search

This commit is contained in:
JimmFly
2022-12-13 18:04:02 +08:00
22 changed files with 175 additions and 64 deletions
@@ -22,7 +22,6 @@ const isMac = () => {
export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
const [query, setQuery] = useState('');
const { triggerQuickSearchModal } = useModal();
useEffect(() => {
const down = (e: KeyboardEvent) => {
if (e.key === 'k' && e.metaKey) {
@@ -38,7 +37,7 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
};
document.addEventListener('keydown', down);
return () => document.removeEventListener('keydown', down);
}, [open]);
}, [open, triggerQuickSearchModal]);
return (
<Modal open={open} onClose={onClose} wrapperPosition={['top', 'center']}>
<ModalWrapper