From 1938f6ea233fe8966f141ac60d1719288204c227 Mon Sep 17 00:00:00 2001 From: Sonny Date: Fri, 15 Nov 2024 14:23:39 +0100 Subject: [PATCH] fix: collection name not displayed correctly when too large. --- .../dashboard/collection/item/collection_item.tsx | 11 ++++++++--- inertia/components/dashboard/dashboard_header.tsx | 2 +- .../dashboard/favorite/item/favorite_item.tsx | 8 +++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/inertia/components/dashboard/collection/item/collection_item.tsx b/inertia/components/dashboard/collection/item/collection_item.tsx index d3a3d4e..ece06f5 100644 --- a/inertia/components/dashboard/collection/item/collection_item.tsx +++ b/inertia/components/dashboard/collection/item/collection_item.tsx @@ -33,14 +33,19 @@ export default function CollectionItem({ href={appendCollectionId(route('dashboard').path, collection.id)} key={collection.id} ref={itemRef} + title={collection.name} > - + {collection.name} {showLinks && ( - - — {linksCount} + + — {linksCount}0 )} diff --git a/inertia/components/dashboard/dashboard_header.tsx b/inertia/components/dashboard/dashboard_header.tsx index d41857a..381b4b8 100644 --- a/inertia/components/dashboard/dashboard_header.tsx +++ b/inertia/components/dashboard/dashboard_header.tsx @@ -43,7 +43,7 @@ export function DashboardHeader({ navbar, aside }: DashboardHeaderProps) { hiddenFrom="sm" size="sm" /> - + {activeCollection?.name}{' '} {activeCollection?.visibility === Visibility.PUBLIC && ( diff --git a/inertia/components/dashboard/favorite/item/favorite_item.tsx b/inertia/components/dashboard/favorite/item/favorite_item.tsx index b3ab8ae..207ea1d 100644 --- a/inertia/components/dashboard/favorite/item/favorite_item.tsx +++ b/inertia/components/dashboard/favorite/item/favorite_item.tsx @@ -14,7 +14,13 @@ export const FavoriteItem = ({ link }: { link: LinkWithCollection }) => ( {link.name} - + {link.collection.name}