fix: eslint warning about quick search

This commit is contained in:
JimmFly
2022-12-23 12:50:21 +08:00
parent d17c7ecbd4
commit 5b1a43f16b
3 changed files with 5 additions and 4 deletions
@@ -38,7 +38,7 @@ export const Input = (props: {
<Command.Input
ref={inputRef}
value={inputValue}
onCompositionStart={e => {
onCompositionStart={() => {
setIsComposition(true);
}}
onCompositionEnd={e => {
@@ -31,7 +31,8 @@ export const Results = (props: {
setResults(search(query));
setLoading(false);
//Save the Map<BlockId, PageId> obtained from the search as state
}, [query, search, setLoading]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [query, setResults, setLoading]);
const pageIds = [...results.values()];
const resultsPageMeta = pageMetaList.filter(
+2 -2
View File
@@ -1,4 +1,4 @@
import React, { CSSProperties } from 'react';
import { CSSProperties } from 'react';
import { EmptySVG } from './emptySVG';
import { styled } from '@/styles';
@@ -8,7 +8,7 @@ export type ContentProps = {
fontSize?: CSSProperties['fontSize'];
};
export const Empty = styled(EmptySVG)<ContentProps>(
({ theme, fontSize, width, height }) => {
({ fontSize, width, height }) => {
return {
width,
height,