mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-09-04 12:56:14 +08:00
fix: rendering of campaign with no template
This commit is contained in:
parent
c0ae1bc141
commit
2e7a303a55
1 changed files with 3 additions and 2 deletions
|
@ -65,6 +65,7 @@ export const actionStep: JourneyStepType<ActionConfig> = {
|
|||
}
|
||||
return null
|
||||
}, [projectId, campaign_id]))
|
||||
const template = campaign?.templates?.[0]
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -75,8 +76,8 @@ export const actionStep: JourneyStepType<ActionConfig> = {
|
|||
{campaign?.name ?? <>–</>}
|
||||
</div>
|
||||
<div className="journey-step-action-preview">
|
||||
{ campaign
|
||||
? <Preview template={campaign.templates[0]} size="small" />
|
||||
{ campaign && template
|
||||
? <Preview template={template} size="small" />
|
||||
: (
|
||||
<div className="journey-step-action-preview-placeholder">{t('journey_campaign_create_preview')}</div>
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue