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(electron): missing collection name in tab header (#7807)

pengx17fc19180451cd
diff --git a/packages/frontend/core/src/pages/workspace/collection/index.tsx b/packages/frontend/core/src/pages/workspace/collection/index.tsx
index 822bc71f81..e02ea117df 100644
--- a/packages/frontend/core/src/pages/workspace/collection/index.tsx
+++ b/packages/frontend/core/src/pages/workspace/collection/index.tsx
@@ -121,11 +121,19 @@ export const Component = function CollectionPage() {
if (!collection) {
return null;
}
- return isEmpty(collection) ? (
+ const inner = isEmpty(collection) ? (
<Placeholder collection={collection} />
) : (
<CollectionDetail collection={collection} />
);
+
+ return (
+ <>
+ <ViewIcon icon="collection" />
+ <ViewTitle title={collection.name} />
+ {inner}
+ </>
+ );
};
const Placeholder = ({ collection }: { collection: Collection }) => {
@@ -157,8 +165,6 @@ const Placeholder = ({ collection }: { collection: Collection }) => {
return (
<>
- <ViewTitle title={collection.name} />
- <ViewIcon icon="collection" />
<ViewHeader>
<div
style={{