Allow null in multichannel campaign. (#41180)
This commit is contained in:
commit
eac4258baa
|
@ -58,7 +58,7 @@ export type Campaign = {
|
|||
cost: {
|
||||
value: string;
|
||||
currency: string;
|
||||
};
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type CampaignsPage = {
|
||||
|
|
|
@ -46,11 +46,15 @@ export const useCampaigns = ( page = 1, perPage = 5 ): UseCampaignsType => {
|
|||
( el ) => el.slug === campaign.channel
|
||||
);
|
||||
|
||||
const cost = campaign.cost
|
||||
? `${ campaign.cost.currency } ${ campaign.cost.value }`
|
||||
: '';
|
||||
|
||||
return {
|
||||
id: `${ campaign.channel }|${ campaign.id }`,
|
||||
title: campaign.title,
|
||||
description: '',
|
||||
cost: `${ campaign.cost.currency } ${ campaign.cost.value }`,
|
||||
cost,
|
||||
manageUrl: campaign.manage_url,
|
||||
icon: channel?.icon || '',
|
||||
channelName: channel?.title || '',
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Allow null value in cost field for multichannel campaign.
|
Loading…
Reference in New Issue