Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(core): workspace selector on the upgrade to team page overflows (#9586)

JimmFlya24630ba563f
diff --git a/packages/frontend/core/src/desktop/pages/upgrade-to-team/index.tsx b/packages/frontend/core/src/desktop/pages/upgrade-to-team/index.tsx
index 35c694c938..c254b4d9de 100644
--- a/packages/frontend/core/src/desktop/pages/upgrade-to-team/index.tsx
+++ b/packages/frontend/core/src/desktop/pages/upgrade-to-team/index.tsx
@@ -7,6 +7,7 @@ import {
MenuTrigger,
Modal,
notify,
+ Scrollable,
} from '@affine/component';
import { AuthPageContainer } from '@affine/component/auth-components';
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
@@ -238,13 +239,18 @@ const WorkspaceSelector = ({
return (
<div>
{cloudWorkspaces.length > 0 ? (
- cloudWorkspaces.map(workspace => (
- <WorkspaceItem
- key={workspace.id}
- meta={workspace}
- onSelect={handleSelect}
- />
- ))
+ <Scrollable.Root>
+ <Scrollable.Viewport style={{ maxHeight: '40vh' }}>
+ {cloudWorkspaces.map(workspace => (
+ <WorkspaceItem
+ key={workspace.id}
+ meta={workspace}
+ onSelect={handleSelect}
+ />
+ ))}
+ </Scrollable.Viewport>
+ <Scrollable.Scrollbar />
+ </Scrollable.Root>
) : (
<div className={styles.noWorkspaceItem}>
{t['com.affine.upgrade-to-team-page.no-workspace-available']()}