Remove unneeded return in CreateNewCampaignModal.

This helps us save indentation and make the code few lines shorter.
This commit is contained in:
Gan Eng Chin 2023-03-09 22:26:06 +08:00
parent e15305b7c3
commit 9f0326b398
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
1 changed files with 48 additions and 53 deletions

View File

@ -60,8 +60,7 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
) }
</div>
<div>
{ campaignTypes?.map( ( el ) => {
return (
{ campaignTypes?.map( ( el ) => (
<Flex
key={ el.id }
className="woocommerce-marketing-new-campaign-type"
@ -97,10 +96,7 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
>
<Flex gap={ 1 }>
<FlexItem>
{ __(
'Create',
'woocommerce'
) }
{ __( 'Create', 'woocommerce' ) }
</FlexItem>
{ isExternalURL( el.createUrl ) && (
<FlexItem>
@ -114,8 +110,7 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
</Button>
</FlexItem>
</Flex>
);
} ) }
) ) }
</div>
</div>
{ !! recommendedChannels?.length && (