Skip to content

Commit 829dbd4

Browse files
authored
fix: collection header (#1264)
1 parent 6282c11 commit 829dbd4

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

web/src/app/workspace/collections/[collectionId]/collection-header.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ export const CollectionHeader = ({ className }: { className?: string }) => {
160160
</DropdownMenu>
161161
</CardAction>
162162
</CardHeader>
163+
<CardDescription className="mb-4 px-4">
164+
{collection.description || 'No description available'}
165+
</CardDescription>
163166
<Separator />
164-
<div className="bg-accent/50 flex flex-row gap-4 rounded-b-xl px-4">
167+
<div className="bg-accent/50 flex flex-row gap-2 rounded-b-xl px-4">
165168
<Button
166169
asChild
167170
data-active={Boolean(pathname.match(urls.documents))}

web/src/app/workspace/collections/collection-list.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,11 @@ export const CollectionList = ({
7070
}
7171
target={collection.subscription_id ? '_blank' : '_self'}
7272
>
73-
<Card className="hover:bg-accent/30 h-34 cursor-pointer rounded-md">
73+
<Card className="hover:bg-accent/30 cursor-pointer gap-2 rounded-md">
7474
<CardHeader className="px-4">
7575
<CardTitle className="h-5 truncate">
7676
{collection.title}
7777
</CardTitle>
78-
<CardDescription className="h-5 truncate">
79-
{collection.description || 'No description available'}
80-
</CardDescription>
8178
<CardAction className="flex flex-row items-center gap-4">
8279
{collection.subscription_id ? (
8380
<Badge>Subscribed</Badge>
@@ -92,6 +89,9 @@ export const CollectionList = ({
9289
)}
9390
</CardAction>
9491
</CardHeader>
92+
<CardDescription className="mb-4 truncate px-4">
93+
{collection.description || 'No description available'}
94+
</CardDescription>
9595
<CardFooter className="justify-between px-4 text-xs">
9696
<div className="text-muted-foreground">
9797
{collection.created && (

web/src/app/workspace/market/collections/[collectionId]/collection-header.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,8 @@ export const CollectionHeader = ({
6262
return (
6363
<PageContent className={cn('flex flex-col gap-4 pb-0', className)}>
6464
<Card className="gap-0 p-0">
65-
<CardHeader className="p-4">
66-
<CardTitle className="text-2xl">{collection.title}</CardTitle>
67-
<CardDescription>
68-
{collection.description || 'No description available'}
69-
</CardDescription>
65+
<CardHeader className="p-4 pb-0">
66+
<CardTitle className="mb-0 text-2xl">{collection.title}</CardTitle>
7067
<CardAction className="text-muted-foreground flex flex-row items-center gap-4 text-xs">
7168
{isOwner ? (
7269
<Badge>Mine</Badge>
@@ -78,7 +75,6 @@ export const CollectionHeader = ({
7875
</div>
7976
</div>
8077
)}
81-
8278
<Button
8379
variant="outline"
8480
size="sm"
@@ -92,8 +88,11 @@ export const CollectionHeader = ({
9288
</Button>
9389
</CardAction>
9490
</CardHeader>
91+
<CardDescription className="mb-4 px-4">
92+
{collection.description || 'No description available'}
93+
</CardDescription>
9594
<Separator />
96-
<div className="bg-accent/50 flex flex-row gap-4 rounded-b-xl px-4">
95+
<div className="bg-accent/50 flex flex-row gap-2 rounded-b-xl px-4">
9796
<Button
9897
asChild
9998
data-active={Boolean(

web/src/app/workspace/market/collections/collection-list.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,12 @@ export const CollectionList = ({
5858
key={collection.id}
5959
href={`/workspace/market/collections/${collection.id}/documents`}
6060
>
61-
<Card className="hover:bg-accent/30 h-34 cursor-pointer rounded-md">
61+
<Card className="hover:bg-accent/30 cursor-pointer gap-2 rounded-md">
6262
<CardHeader className="px-4">
6363
<CardTitle className="h-5 truncate">
6464
{collection.title}
6565
</CardTitle>
66-
<CardDescription className="h-5 truncate">
67-
{collection.description || 'No description available'}
68-
</CardDescription>
66+
6967
<CardAction className="flex flex-row gap-2">
7068
{/* {isOwner && (
7169
<Button
@@ -83,6 +81,9 @@ export const CollectionList = ({
8381
)} */}
8482
</CardAction>
8583
</CardHeader>
84+
<CardDescription className="mb-4 truncate px-4">
85+
{collection.description || 'No description available'}
86+
</CardDescription>
8687
<CardFooter className="text-muted-foreground justify-between px-4 text-sm">
8788
{isOwner ? (
8889
<Badge>Mine</Badge>

0 commit comments

Comments
 (0)