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): remove joined workspace icon from current worksapce card (#8117)

JimmFly8be67dce8294
diff --git a/packages/frontend/core/src/components/workspace-selector/index.tsx b/packages/frontend/core/src/components/workspace-selector/index.tsx
index 21746e542f..54b5956708 100644
--- a/packages/frontend/core/src/components/workspace-selector/index.tsx
+++ b/packages/frontend/core/src/components/workspace-selector/index.tsx
@@ -107,6 +107,7 @@ export const WorkspaceSelector = ({
className={className}
showArrowDownIcon={showArrowDownIcon}
disable={disable}
+ hideCollaborationIcon={true}
data-testid="current-workspace-card"
/>
) : (
diff --git a/packages/frontend/core/src/components/workspace-selector/workspace-card/index.tsx b/packages/frontend/core/src/components/workspace-selector/workspace-card/index.tsx
index 0bb4515c2e..b07f5c15ce 100644
--- a/packages/frontend/core/src/components/workspace-selector/workspace-card/index.tsx
+++ b/packages/frontend/core/src/components/workspace-selector/workspace-card/index.tsx
@@ -241,6 +241,7 @@ export const WorkspaceCard = forwardRef<
showArrowDownIcon?: boolean;
avatarSize?: number;
disable?: boolean;
+ hideCollaborationIcon?: boolean;
onClickOpenSettings?: (workspaceMetadata: WorkspaceMetadata) => void;
onClickEnableCloud?: (workspaceMetadata: WorkspaceMetadata) => void;
}
@@ -255,6 +256,7 @@ export const WorkspaceCard = forwardRef<
onClickEnableCloud,
className,
disable,
+ hideCollaborationIcon,
...props
},
ref
@@ -314,7 +316,9 @@ export const WorkspaceCard = forwardRef<
Enable Cloud
</Button>
) : null}
- {information?.isOwner ? null : <CollaborationIcon />}
+ {hideCollaborationIcon || information?.isOwner ? null : (
+ <CollaborationIcon />
+ )}
{onClickOpenSettings && (
<div
className={styles.settingButton}