From 3819342ff2565829c4dcda0a398f5279546d0450 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Thu, 15 Jun 2023 12:46:56 +0800 Subject: [PATCH] fix: add guide to the other page (#2779) --- apps/web/src/layouts/workspace-layout.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web/src/layouts/workspace-layout.tsx b/apps/web/src/layouts/workspace-layout.tsx index f9abddc27e..8ccee15e97 100644 --- a/apps/web/src/layouts/workspace-layout.tsx +++ b/apps/web/src/layouts/workspace-layout.tsx @@ -10,7 +10,7 @@ import { WorkspaceFallback, } from '@affine/component/workspace'; import { DebugLogger } from '@affine/debug'; -import { config, DEFAULT_HELLO_WORLD_PAGE_ID } from '@affine/env'; +import { config, DEFAULT_HELLO_WORLD_PAGE_ID, env } from '@affine/env'; import { initEmptyPage, initPageWithPreloading } from '@affine/env/blocksuite'; import type { BackgroundProvider } from '@affine/env/workspace'; import { WorkspaceFlavour } from '@affine/env/workspace'; @@ -48,6 +48,7 @@ import { publicWorkspaceAtom, publicWorkspaceIdAtom, } from '../atoms/public-workspace'; +import type { IslandItemNames } from '../components/pure/help-island'; import { HelpIsland } from '../components/pure/help-island'; import { DROPPABLE_SIDEBAR_TRASH, @@ -407,6 +408,10 @@ export const WorkspaceLayoutInner: FC = ({ children }) => { ); const t = useAFFiNEI18N(); + const showList: IslandItemNames[] = env.isDesktop + ? ['whatNew', 'contact', 'guide'] + : ['whatNew', 'contact']; + const handleDragEnd = useCallback( (e: DragEndEvent) => { // Drag page into trash folder @@ -461,9 +466,7 @@ export const WorkspaceLayoutInner: FC = ({ children }) => { {!isPublicWorkspace && ( )}