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 = {
|
export const SmallName: Story = {
|
||||||
args: {
|
args: {
|
||||||
id: 'airbnb',
|
opportunityId: 'airbnb',
|
||||||
name: 'Airbnb',
|
companyName: 'Airbnb',
|
||||||
avatarUrl: 'https://api.faviconkit.com/airbnb.com/144',
|
avatarUrl: 'https://api.faviconkit.com/airbnb.com/144',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BigName: Story = {
|
export const BigName: Story = {
|
||||||
args: {
|
args: {
|
||||||
id: 'google',
|
opportunityId: 'google',
|
||||||
name: 'Google with a real big name to overflow the cell',
|
companyName: 'Google with a real big name to overflow the cell',
|
||||||
avatarUrl: 'https://api.faviconkit.com/google.com/144',
|
avatarUrl: 'https://api.faviconkit.com/google.com/144',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -197,8 +197,8 @@ export const CompanyBoardCard = () => {
|
|||||||
>
|
>
|
||||||
<StyledBoardCardHeader showCompactView={showCompactView}>
|
<StyledBoardCardHeader showCompactView={showCompactView}>
|
||||||
<CompanyChip
|
<CompanyChip
|
||||||
id={company.id}
|
opportunityId={opportunity.id}
|
||||||
name={company.name}
|
companyName={company.name}
|
||||||
avatarUrl={getLogoUrlFromDomainName(company.domainName)}
|
avatarUrl={getLogoUrlFromDomainName(company.domainName)}
|
||||||
variant={EntityChipVariant.Transparent}
|
variant={EntityChipVariant.Transparent}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -4,22 +4,22 @@ import {
|
|||||||
} from '@/ui/display/chip/components/EntityChip';
|
} from '@/ui/display/chip/components/EntityChip';
|
||||||
|
|
||||||
type CompanyChipProps = {
|
type CompanyChipProps = {
|
||||||
id: string;
|
opportunityId: string;
|
||||||
name: string;
|
companyName: string;
|
||||||
avatarUrl?: string;
|
avatarUrl?: string;
|
||||||
variant?: EntityChipVariant;
|
variant?: EntityChipVariant;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const CompanyChip = ({
|
export const CompanyChip = ({
|
||||||
id,
|
opportunityId,
|
||||||
name,
|
companyName,
|
||||||
avatarUrl,
|
avatarUrl,
|
||||||
variant = EntityChipVariant.Regular,
|
variant = EntityChipVariant.Regular,
|
||||||
}: CompanyChipProps) => (
|
}: CompanyChipProps) => (
|
||||||
<EntityChip
|
<EntityChip
|
||||||
entityId={id}
|
entityId={opportunityId}
|
||||||
linkToEntity={`/object/company/${id}`}
|
linkToEntity={`/object/opportunity/${opportunityId}`}
|
||||||
name={name}
|
name={companyName}
|
||||||
avatarType="squared"
|
avatarType="squared"
|
||||||
avatarUrl={avatarUrl}
|
avatarUrl={avatarUrl}
|
||||||
variant={variant}
|
variant={variant}
|
||||||
|
|||||||
Reference in New Issue
Block a user