mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
fix: lint error
This commit is contained in:
@@ -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
@@ -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>;
|
||||
Reference in New Issue
Block a user