mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 07:06:28 +08:00
feat: disable search feature
This commit is contained in:
@@ -5,12 +5,7 @@ import {
|
||||
styled,
|
||||
TransitionsModal,
|
||||
} from '@toeverything/components/ui';
|
||||
import {
|
||||
BlockEditor,
|
||||
HookType,
|
||||
PluginHooks,
|
||||
Virgo,
|
||||
} from '@toeverything/framework/virgo';
|
||||
import { BlockEditor, PluginHooks, Virgo } from '@toeverything/framework/virgo';
|
||||
import { throttle } from '@toeverything/utils';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useNavigate, useParams } from 'react-router';
|
||||
@@ -76,13 +71,13 @@ export const Search = (props: SearchProps) => {
|
||||
setSearch('');
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const sub = props.hooks.get(HookType.ON_SEARCH).subscribe(handleSearch);
|
||||
// useEffect(() => {
|
||||
// const sub = props.hooks.get(HookType.ON_SEARCH).subscribe(handleSearch);
|
||||
|
||||
return () => {
|
||||
sub.unsubscribe();
|
||||
};
|
||||
}, [props, handleSearch]);
|
||||
// return () => {
|
||||
// sub.unsubscribe();
|
||||
// };
|
||||
// }, [props, handleSearch]);
|
||||
|
||||
return (
|
||||
<TransitionsModal
|
||||
|
||||
@@ -57,6 +57,7 @@ export const LayoutHeader = () => {
|
||||
size="large"
|
||||
hoverColor={'transparent'}
|
||||
onClick={handleSearch}
|
||||
disabled={true}
|
||||
>
|
||||
<SearchIcon />
|
||||
</IconButton>
|
||||
|
||||
Reference in New Issue
Block a user