Skip to content

Commit fa46334

Browse files
authored
fix: remove empty space below collection name (#402)
- empty space appears when collection description is left blank
1 parent ec00ba1 commit fa46334

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

packages/root-cms/ui/pages/CollectionPage/CollectionPage.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ export function CollectionPage(props: CollectionPageProps) {
102102
<div className="CollectionPage__side__collection__name">
103103
{collection.name || collection.id}
104104
</div>
105-
<div className="CollectionPage__side__collection__desc">
106-
{collection.description || ''}
107-
</div>
105+
{collection.description && (
106+
<div className="CollectionPage__side__collection__desc">
107+
{collection.description}
108+
</div>
109+
)}
108110
</a>
109111
))}
110112
{matchedCollections.length === 0 && (

packages/root-cms/ui/pages/ProjectPage/ProjectPage.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ ProjectPage.CollectionList = () => {
6969
<div className="ProjectPage__collectionList__collection__name">
7070
{collection.name || collection.id}
7171
</div>
72-
<div className="ProjectPage__collectionList__collection__desc">
73-
{collection.description || ''}
74-
</div>
72+
{collection.description && (
73+
<div className="ProjectPage__collectionList__collection__desc">
74+
{collection.description}
75+
</div>
76+
)}
7577
</a>
7678
))}
7779
{collections.length === 0 && (

0 commit comments

Comments
 (0)