mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-12 14:40:22 +08:00
fix: lint error
This commit is contained in:
@@ -23,8 +23,3 @@ export const StyledButtonWrapper = styled.div(() => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const StyledLoadingWrapper = styled.div(() => {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ import React from 'react';
|
|||||||
import { Command, useCommandState } from 'cmdk';
|
import { Command, useCommandState } from 'cmdk';
|
||||||
|
|
||||||
const noResult = () => {
|
const noResult = () => {
|
||||||
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||||
const search = useCommandState(state => state.search);
|
const search = useCommandState(state => state.search);
|
||||||
|
// eslint-disable-next-line react/no-unescaped-entities
|
||||||
return <Command.Empty>No results found for "{search}".</Command.Empty>;
|
return <Command.Empty>No results found for "{search}".</Command.Empty>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
|||||||
const [result, setResult] = useState({});
|
const [result, setResult] = useState({});
|
||||||
const { pageList } = useEditor();
|
const { pageList } = useEditor();
|
||||||
const { triggerQuickSearchModal } = useModal();
|
const { triggerQuickSearchModal } = useModal();
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
setResult(search(query, { enrich: true }));
|
// setResult(search(query, { enrich: true }));
|
||||||
}, [query]);
|
// }, [query]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const down = (e: KeyboardEvent) => {
|
const down = (e: KeyboardEvent) => {
|
||||||
if (e.key === 'k' && e.metaKey) {
|
if (e.key === 'k' && e.metaKey) {
|
||||||
@@ -44,7 +44,7 @@ export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
|||||||
};
|
};
|
||||||
document.addEventListener('keydown', down);
|
document.addEventListener('keydown', down);
|
||||||
return () => document.removeEventListener('keydown', down);
|
return () => document.removeEventListener('keydown', down);
|
||||||
}, [open]);
|
}, [open, triggerQuickSearchModal]);
|
||||||
return (
|
return (
|
||||||
<Modal open={open} onClose={onClose} wrapperPosition={['top', 'center']}>
|
<Modal open={open} onClose={onClose} wrapperPosition={['top', 'center']}>
|
||||||
<ModalWrapper
|
<ModalWrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user