mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-28 12:52:57 +03:00
feat: reset quick search
This commit is contained in:
parent
64e90640b9
commit
469931a61f
@ -22,17 +22,14 @@ const isMac = () => {
|
||||
return getUaHelper().isMacOs;
|
||||
};
|
||||
export const QuickSearch = ({ open, onClose }: TransitionsModalProps) => {
|
||||
const { currentWorkspaceId, workspaceList } = useAppState();
|
||||
const { currentMetaWorkSpace } = useAppState();
|
||||
|
||||
const [query, setQuery] = useState('');
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [showCreatePage, setShowCreatePage] = useState(true);
|
||||
const { triggerQuickSearchModal } = useModal();
|
||||
|
||||
const currentWorkspace = workspaceList.find(
|
||||
meta => String(meta.id) === String(currentWorkspaceId)
|
||||
);
|
||||
const isPublish = currentWorkspace?.isPublish;
|
||||
const isPublish = currentMetaWorkSpace?.isPublish;
|
||||
|
||||
// Add ‘⌘+K’ shortcut keys as switches
|
||||
useEffect(() => {
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import ShortcutsModal from '@/components/shortcuts-modal';
|
||||
import ContactModal from '@/components/contact-modal';
|
||||
// import QuickSearch from '@/components/quick-search';
|
||||
import QuickSearch from '@/components/quick-search';
|
||||
import { ImportModal } from '@/components/import';
|
||||
import { LoginModal } from '@/components/login-modal';
|
||||
|
||||
@ -97,12 +97,12 @@ export const ModalProvider = ({
|
||||
triggerHandler('shortcuts', false);
|
||||
}}
|
||||
></ShortcutsModal>
|
||||
{/*<QuickSearch*/}
|
||||
{/* open={modalMap.quickSearch}*/}
|
||||
{/* onClose={() => {*/}
|
||||
{/* triggerHandler('quickSearch', false);*/}
|
||||
{/* }}*/}
|
||||
{/*></QuickSearch>*/}
|
||||
<QuickSearch
|
||||
open={modalMap.quickSearch}
|
||||
onClose={() => {
|
||||
triggerHandler('quickSearch', false);
|
||||
}}
|
||||
></QuickSearch>
|
||||
<ImportModal
|
||||
open={modalMap.import}
|
||||
onClose={() => {
|
||||
|
Loading…
Reference in New Issue
Block a user