Improve tests (#871)

This commit is contained in:
Charles Bochet
2023-07-24 00:57:56 -07:00
committed by GitHub
parent 2b885f2496
commit 07180af8c0
53 changed files with 432 additions and 251 deletions

View File

@ -1,29 +1,25 @@
import { ChipVariant, EntityChip } from '@/ui/chip/components/EntityChip';
import { EntityChip } from '@/ui/chip/components/EntityChip';
type OwnProps = {
id: string;
name: string;
picture?: string;
pictureUrl?: string;
clickable?: boolean;
variant?: ChipVariant;
};
export function CompanyChip({
id,
name,
picture,
clickable,
variant = ChipVariant.opaque,
pictureUrl,
clickable = true,
}: OwnProps) {
return (
<EntityChip
entityId={id}
linkToEntity={`/companies/${id}`}
linkToEntity={clickable ? `/companies/${id}` : undefined}
name={name}
avatarType="squared"
clickable={clickable}
picture={picture}
variant={variant}
pictureUrl={pictureUrl}
/>
);
}