From 0e6b47d068ac138097da9747ac33e4dc2855fe1b Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Tue, 5 Dec 2023 04:39:01 -0500 Subject: [PATCH] improved UI --- components/CollectionCard.tsx | 5 +-- components/LinkCard.tsx | 35 +++++++++---------- .../EditCollectionSharingModal.tsx | 2 ++ components/ProfilePhoto.tsx | 2 +- pages/collections/[id].tsx | 8 +++-- pages/public/collections/[id].tsx | 5 +-- 6 files changed, 32 insertions(+), 25 deletions(-) diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx index 0d904a5..d2f59b5 100644 --- a/components/CollectionCard.tsx +++ b/components/CollectionCard.tsx @@ -121,7 +121,7 @@ export default function CollectionCard({ collection, className }: Props) { {collectionOwner.id ? ( ) : undefined} {collection.members @@ -131,13 +131,14 @@ export default function CollectionCard({ collection, className }: Props) { ); }) .slice(0, 3)} {collection.members.length - 3 > 0 ? ( -
+
+{collection.members.length - 3}
diff --git a/components/LinkCard.tsx b/components/LinkCard.tsx index 9add494..619effc 100644 --- a/components/LinkCard.tsx +++ b/components/LinkCard.tsx @@ -250,8 +250,23 @@ export default function LinkCard({ link, count, className }: Props) {

{collection?.name}

+ { + e.stopPropagation(); + }} + className="flex items-center gap-1 max-w-full w-fit text-neutral hover:opacity-70 duration-100" + > + +

{shortendURL}

+ +
+ +

{formattedDate}

+
{link.tags[0] ? ( -
+
{link.tags.map((e, i) => (
) : ( -

No Tags

+

No Tags

)} - - { - e.stopPropagation(); - }} - className="flex items-center gap-1 max-w-full w-fit text-neutral hover:opacity-70 duration-100" - > - -

{shortendURL}

- -
- -

{formattedDate}

-
diff --git a/components/ModalContent/EditCollectionSharingModal.tsx b/components/ModalContent/EditCollectionSharingModal.tsx index e456d75..a3fd163 100644 --- a/components/ModalContent/EditCollectionSharingModal.tsx +++ b/components/ModalContent/EditCollectionSharingModal.tsx @@ -211,6 +211,7 @@ export default function EditCollectionSharingModal({ src={ collectionOwner.image ? collectionOwner.image : undefined } + name={collectionOwner.name} />
@@ -259,6 +260,7 @@ export default function EditCollectionSharingModal({

{e.user.name}

diff --git a/components/ProfilePhoto.tsx b/components/ProfilePhoto.tsx index 07a8cc5..c73708a 100644 --- a/components/ProfilePhoto.tsx +++ b/components/ProfilePhoto.tsx @@ -31,7 +31,7 @@ export default function ProfilePhoto({ return !image ? (
diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsx index 6734b00..08ff8dc 100644 --- a/pages/collections/[id].tsx +++ b/pages/collections/[id].tsx @@ -111,7 +111,10 @@ export default function Index() { onClick={() => setEditCollectionSharingModal(true)} > {collectionOwner.id ? ( - + ) : undefined} {activeCollection.members .sort((a, b) => (a.userId as number) - (b.userId as number)) @@ -121,12 +124,13 @@ export default function Index() { key={i} src={e.user.image ? e.user.image : undefined} className="-ml-3" + name={e.user.name} /> ); }) .slice(0, 3)} {activeCollection.members.length - 3 > 0 ? ( -
+
+{activeCollection.members.length - 3}
diff --git a/pages/public/collections/[id].tsx b/pages/public/collections/[id].tsx index 7d25b71..6e98df4 100644 --- a/pages/public/collections/[id].tsx +++ b/pages/public/collections/[id].tsx @@ -145,7 +145,7 @@ export default function PublicCollections() { {collectionOwner.id ? ( ) : undefined} {collection.members @@ -156,12 +156,13 @@ export default function PublicCollections() { key={i} src={e.user.image ? e.user.image : undefined} className="-ml-3" + name={e.user.name} /> ); }) .slice(0, 3)} {collection.members.length - 3 > 0 ? ( -
+
+{collection.members.length - 3}