import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faChevronRight } from "@fortawesome/free-solid-svg-icons"; import Link from "next/link"; import { CollectionIncludingMembers } from "@/types/global"; import useLinkStore from "@/store/links"; export default function CollectionItem({ collection, }: { collection: CollectionIncludingMembers; }) { const { links } = useLinkStore(); return (
{collection.name}
{collection.description}
Members:
{collection.members.map((e, i) => { return ({e.user.name}
); })}{links.filter((e) => e.collectionId === collection.id).length} Links