From f4aa249138edd4b76957bd2eaed2ca14220f7ee7 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Wed, 19 Jul 2023 12:51:15 +0800 Subject: [PATCH] fix: banner blocking new page button issue (#3301) --- .../blocksuite/workspace-header/header.tsx | 24 ++++++++++++------- .../blocksuite/workspace-header/styles.css.ts | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/core/src/components/blocksuite/workspace-header/header.tsx b/apps/core/src/components/blocksuite/workspace-header/header.tsx index 33437c1d3e..df76cb7b22 100644 --- a/apps/core/src/components/blocksuite/workspace-header/header.tsx +++ b/apps/core/src/components/blocksuite/workspace-header/header.tsx @@ -23,6 +23,7 @@ import { import { contentLayoutAtom } from '../../../atoms/layout'; import { currentModeAtom } from '../../../atoms/mode'; import type { AffineOfficialWorkspace } from '../../../shared'; +import DownloadClientTip from './download-tips'; import { EditorOptionMenu } from './header-right-items/editor-option-menu'; import TrashButtonGroup from './header-right-items/trash-button-group'; import * as styles from './styles.css'; @@ -165,6 +166,7 @@ export const Header = forwardRef< PropsWithChildren & HTMLAttributes >((props, ref) => { const [showWarning, setShowWarning] = useState(false); + const [showDownloadTip, setShowDownloadTip] = useState(true); // const [shouldShowGuideDownloadClientTip] = useAtom( // guideDownloadClientTipAtom // ); @@ -184,14 +186,20 @@ export const Header = forwardRef< data-open={open} data-sidebar-floating={appSidebarFloating} > - } - onClose={() => { - setShowWarning(false); - }} - /> - + {showDownloadTip ? ( + setShowDownloadTip(false)} + /> + ) : ( + } + onClose={() => { + setShowWarning(false); + }} + /> + )}