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