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

View File

@@ -121,11 +121,19 @@ export const Component = function CollectionPage() {
if (!collection) { if (!collection) {
return null; return null;
} }
return isEmpty(collection) ? ( const inner = isEmpty(collection) ? (
<Placeholder collection={collection} /> <Placeholder collection={collection} />
) : ( ) : (
<CollectionDetail collection={collection} /> <CollectionDetail collection={collection} />
); );
return (
<>
<ViewIcon icon="collection" />
<ViewTitle title={collection.name} />
{inner}
</>
);
}; };
const Placeholder = ({ collection }: { collection: Collection }) => { const Placeholder = ({ collection }: { collection: Collection }) => {
@@ -157,8 +165,6 @@ const Placeholder = ({ collection }: { collection: Collection }) => {
return ( return (
<> <>
<ViewTitle title={collection.name} />
<ViewIcon icon="collection" />
<ViewHeader> <ViewHeader>
<div <div
style={{ style={{