Update company board card link to opportunity show page (#3557)
Update board link to opportunity show page Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
@ -15,16 +15,16 @@ type Story = StoryObj<typeof CompanyChip>;
|
||||
|
||||
export const SmallName: Story = {
|
||||
args: {
|
||||
id: 'airbnb',
|
||||
name: 'Airbnb',
|
||||
opportunityId: 'airbnb',
|
||||
companyName: 'Airbnb',
|
||||
avatarUrl: 'https://api.faviconkit.com/airbnb.com/144',
|
||||
},
|
||||
};
|
||||
|
||||
export const BigName: Story = {
|
||||
args: {
|
||||
id: 'google',
|
||||
name: 'Google with a real big name to overflow the cell',
|
||||
opportunityId: 'google',
|
||||
companyName: 'Google with a real big name to overflow the cell',
|
||||
avatarUrl: 'https://api.faviconkit.com/google.com/144',
|
||||
},
|
||||
};
|
||||
|
||||
@ -197,8 +197,8 @@ export const CompanyBoardCard = () => {
|
||||
>
|
||||
<StyledBoardCardHeader showCompactView={showCompactView}>
|
||||
<CompanyChip
|
||||
id={company.id}
|
||||
name={company.name}
|
||||
opportunityId={opportunity.id}
|
||||
companyName={company.name}
|
||||
avatarUrl={getLogoUrlFromDomainName(company.domainName)}
|
||||
variant={EntityChipVariant.Transparent}
|
||||
/>
|
||||
|
||||
@ -4,22 +4,22 @@ import {
|
||||
} from '@/ui/display/chip/components/EntityChip';
|
||||
|
||||
type CompanyChipProps = {
|
||||
id: string;
|
||||
name: string;
|
||||
opportunityId: string;
|
||||
companyName: string;
|
||||
avatarUrl?: string;
|
||||
variant?: EntityChipVariant;
|
||||
};
|
||||
|
||||
export const CompanyChip = ({
|
||||
id,
|
||||
name,
|
||||
opportunityId,
|
||||
companyName,
|
||||
avatarUrl,
|
||||
variant = EntityChipVariant.Regular,
|
||||
}: CompanyChipProps) => (
|
||||
<EntityChip
|
||||
entityId={id}
|
||||
linkToEntity={`/object/company/${id}`}
|
||||
name={name}
|
||||
entityId={opportunityId}
|
||||
linkToEntity={`/object/opportunity/${opportunityId}`}
|
||||
name={companyName}
|
||||
avatarType="squared"
|
||||
avatarUrl={avatarUrl}
|
||||
variant={variant}
|
||||
|
||||
Reference in New Issue
Block a user