import { Col } from 'web/components/layout/col' import { Row } from 'web/components/layout/row' import clsx from 'clsx' import { GroupLinkItem } from 'web/pages/groups' import { XIcon } from '@heroicons/react/outline' import { Button } from 'web/components/button' import { GroupSelector } from 'web/components/groups/group-selector' import { addContractToGroup, canModifyGroupContracts, removeContractFromGroup, } from 'web/lib/firebase/groups' import { User } from 'common/user' import { Contract } from 'common/contract' import { SiteLink } from 'web/components/site-link' import { GroupLink } from 'common/group' import { useGroupsWithContract } from 'web/hooks/use-group' export function ContractGroupsList(props: { groupLinks: GroupLink[] contract: Contract user: User | null | undefined }) { const { groupLinks, user, contract } = props const groups = useGroupsWithContract(contract) return (