diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsx index 4923a01..a141313 100644 --- a/components/CollectionCard.tsx +++ b/components/CollectionCard.tsx @@ -59,7 +59,7 @@ export default function CollectionCard({ collection, className }: Props) { return (
-
+
+
+ collection && + setModal({ + modal: "COLLECTION", + state: true, + method: "UPDATE", + isOwner: permissions === true, + active: collection, + defaultIndex: permissions === true ? 1 : 0, + }) + } + > + {collectionOwner.id ? ( + + ) : undefined} + {collection.members + .sort((a, b) => (a.userId as number) - (b.userId as number)) + .map((e, i) => { + return ( + + ); + }) + .slice(0, 3)} + {collection.members.length - 3 > 0 ? ( +
+
+ +{collection.members.length - 3} +
+
+ ) : null} +
@@ -152,35 +192,8 @@ export default function CollectionCard({ collection, className }: Props) {
-
-
- {collectionOwner.id ? ( - - ) : undefined} - {collection.members - .sort((a, b) => (a.userId as number) - (b.userId as number)) - .map((e, i) => { - return ( - - ); - }) - .slice(0, 3)} - {collection.members.length - 3 > 0 ? ( -
-
- +{collection.members.length - 3} -
-
- ) : null} -
-
+
+
{collection.isPublic ? ( {collection._count && collection._count.links}
-
- -

{formattedDate}

+
+

+ {" "} + {formattedDate} +

diff --git a/components/ProfilePhoto.tsx b/components/ProfilePhoto.tsx index dcc9b43..721db3e 100644 --- a/components/ProfilePhoto.tsx +++ b/components/ProfilePhoto.tsx @@ -29,7 +29,7 @@ export default function ProfilePhoto({ return !image ? (
-
+
{name ? ( {name.slice(0, 1)} ) : ( @@ -42,7 +42,7 @@ export default function ProfilePhoto({
) : (
-
+
{ setModal({ modal: "COLLECTION", diff --git a/pages/public/collections/[id].tsx b/pages/public/collections/[id].tsx index 6060c0f..8d4c065 100644 --- a/pages/public/collections/[id].tsx +++ b/pages/public/collections/[id].tsx @@ -144,54 +144,53 @@ export default function PublicCollections() {
-
- {collectionOwner.id ? ( - - ) : undefined} - {collection.members - .sort((a, b) => (a.userId as number) - (b.userId as number)) - .map((e, i) => { - return ( - - ); - }) - .slice(0, 4)} - {collection?.members.length && - collection.members.length - 3 > 0 ? ( -
-
- +{collection.members.length - 3} +
+
+ setModal({ + modal: "COLLECTION", + state: true, + method: "VIEW_TEAM", + isOwner: false, + active: collection, + defaultIndex: 0, + }) + } + > + {collectionOwner.id ? ( + + ) : undefined} + {collection.members + .sort((a, b) => (a.userId as number) - (b.userId as number)) + .map((e, i) => { + return ( + + ); + }) + .slice(0, 3)} + {collection.members.length - 3 > 0 ? ( +
+
+ +{collection.members.length - 3} +
-
- ) : null} + ) : null} +
-

- By - - setModal({ - modal: "COLLECTION", - state: true, - method: "VIEW_TEAM", - isOwner: false, - active: collection, - defaultIndex: 0, - }) - } - > - {collectionOwner.name} - {collection.members.length > 0 - ? ` and ${collection.members.length} others` - : undefined} - +

+ By {collectionOwner.name} + {collection.members.length > 0 + ? ` and ${collection.members.length} others` + : undefined} + .