import styled from '@emotion/styled'; import { CompanyChip } from '@/companies/components/CompanyChip'; import { PersonChip } from '@/people/components/PersonChip'; import { ActivityTarget, Company, Person } from '~/generated/graphql'; import { getLogoUrlFromDomainName } from '~/utils'; const StyledContainer = styled.div` display: flex; flex-wrap: wrap; gap: ${({ theme }) => theme.spacing(1)}; `; export function ActivityTargetChips({ targets, }: { targets?: Array< Pick & { person?: Pick | null; company?: Pick | null; } > | null; }) { if (!targets) { return null; } return ( {targets.map(({ company, person }) => { if (company) { return ( ); } if (person) { return ( ); } return <>; })} ); }