Skip to content

Commit 37a93f7

Browse files
committed
fix(campaign-item): use customer title instead of regular title
1 parent 6111015 commit 37a93f7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/pages/Dashboard/CampaignItem.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const CampaignItem = ({
1717
const { t } = useTranslation();
1818
const { type, project, family } = campaign;
1919
const isFunctional = family.name.toLowerCase() === 'functional';
20+
const title = campaign.customer_title ?? campaign.title;
2021

2122
return (
2223
<CampaignCard
@@ -25,8 +26,8 @@ export const CampaignItem = ({
2526
// isNew={campaign?.isNew} TODO: need an API update
2627
date={format(new Date(campaign.start_date), 'dd/MM/Y')}
2728
projectTitle={`${project.name}`}
28-
campaignTitle={campaign.title ?? t('__CAMPAIGN_CARD_EMPTY_TITLE_LABEL')}
29-
title={campaign.title ?? t('__CAMPAIGN_CARD_EMPTY_TITLE_LABEL')}
29+
campaignTitle={title ?? t('__CAMPAIGN_CARD_EMPTY_TITLE_LABEL')}
30+
title={title ?? t('__CAMPAIGN_CARD_EMPTY_TITLE_LABEL')}
3031
type={isFunctional ? 'FUNCTIONAL' : 'EXPERIENTIAL'}
3132
status={getCampaignStatus(campaign)}
3233
pillText={type.name}

src/pages/Dashboard/campaigns-list/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const TableList = ({
6565
name: (
6666
<Anchor href={getLocalizeRoute(campaign.id, campaign.family.name)}>
6767
<Span isBold style={{ color: theme.palette.grey[800] }}>
68-
{campaign.title}
68+
{campaign.customer_title ?? campaign.title}
6969
</Span>
7070
</Anchor>
7171
),

src/pages/Dashboard/project-items/table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const TableList = ({ campaigns }: { campaigns: Array<Campaign> }) => {
7171
<TableCell>
7272
<Anchor href={getLocalizeRoute(cp.id, cp.family.name)}>
7373
<Span isBold style={{ color: theme.palette.grey[800] }}>
74-
{cp.title}
74+
{cp.customer_title ?? cp.title}
7575
</Span>
7676
</Anchor>
7777
</TableCell>

0 commit comments

Comments
 (0)