mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: add back quick search button to page title (#1495)
This commit is contained in:
@@ -10,9 +10,9 @@ import { useOpenTips } from '../../../hooks/affine/use-is-first-load';
|
||||
import { usePageMeta } from '../../../hooks/use-page-meta';
|
||||
import { BlockSuiteWorkspace } from '../../../shared';
|
||||
import { PageNotFoundError } from '../../affine/affine-error-eoundary';
|
||||
import { QuickSearchButton } from '../../pure/quick-search-button';
|
||||
import { EditorModeSwitch } from './editor-mode-switch';
|
||||
import Header from './header';
|
||||
import { QuickSearchButton } from './quick-search-button';
|
||||
import {
|
||||
StyledQuickSearchTipButton,
|
||||
StyledQuickSearchTipContent,
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { useSetAtom } from 'jotai';
|
||||
import React, { ReactNode } from 'react';
|
||||
|
||||
import { openQuickSearchModalAtom } from '../../../atoms';
|
||||
import Header from '../../blocksuite/header/header';
|
||||
import { StyledPageListTittleWrapper } from '../../blocksuite/header/styles';
|
||||
import { QuickSearchButton } from '../quick-search-button';
|
||||
|
||||
export type WorkspaceTitleProps = React.PropsWithChildren<{
|
||||
icon?: ReactNode;
|
||||
@@ -11,13 +14,17 @@ export const WorkspaceTitle: React.FC<WorkspaceTitleProps> = ({
|
||||
icon,
|
||||
children,
|
||||
}) => {
|
||||
const setOpenQuickSearch = useSetAtom(openQuickSearchModalAtom);
|
||||
return (
|
||||
<Header>
|
||||
<StyledPageListTittleWrapper>
|
||||
{icon}
|
||||
{children}
|
||||
{/* fixme(himself65): todo *;/}
|
||||
{/*<QuickSearchButton />*/}
|
||||
<QuickSearchButton
|
||||
onClick={() => {
|
||||
setOpenQuickSearch(true);
|
||||
}}
|
||||
/>
|
||||
</StyledPageListTittleWrapper>
|
||||
</Header>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user