fix: lint error

This commit is contained in:
QiShaoXuan
2022-12-13 18:31:33 +08:00
parent 05e2a90822
commit 4356c0503e
2 changed files with 2 additions and 4 deletions
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import NoResult from './notFound';
import NoResult from './not-found';
import { Command } from 'cmdk';
import { PageMeta, useEditor } from '@/providers/editor-provider';
@@ -20,7 +20,7 @@ const SearchResult = (props: { query: string }) => {
useEffect(() => {
return setResults(search(query));
//Save the Map<BlockId, PageId> obtained from the search as state
}, [query]);
}, [query, search]);
const resultsPageMeta: PageMeta[] = [];
@@ -2,8 +2,6 @@ import React from 'react';
import { Command, useCommandState } from 'cmdk';
const NoResult = () => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const search = useCommandState(state => state.search);
// eslint-disable-next-line react/no-unescaped-entities
return <Command.Empty>No results found for "{search}".</Command.Empty>;