fix(electron): missing collection name in tab header (#7807)

fix AF-1177
This commit is contained in:
pengx17 2024-08-09 07:02:37 +00:00
parent 009b5353b1
commit fc19180451
No known key found for this signature in database
GPG Key ID: 23F23D9E8B3971ED

View File

@ -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={{