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