Remove unneeded return in CreateNewCampaignModal.
This helps us save indentation and make the code few lines shorter.
This commit is contained in:
parent
e15305b7c3
commit
9f0326b398
|
@ -60,62 +60,57 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
|
||||||
) }
|
) }
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{ campaignTypes?.map( ( el ) => {
|
{ campaignTypes?.map( ( el ) => (
|
||||||
return (
|
<Flex
|
||||||
<Flex
|
key={ el.id }
|
||||||
key={ el.id }
|
className="woocommerce-marketing-new-campaign-type"
|
||||||
className="woocommerce-marketing-new-campaign-type"
|
gap={ 4 }
|
||||||
gap={ 4 }
|
>
|
||||||
>
|
<FlexItem>
|
||||||
<FlexItem>
|
<img
|
||||||
<img
|
src={ el.icon }
|
||||||
src={ el.icon }
|
alt={ el.name }
|
||||||
alt={ el.name }
|
width="32"
|
||||||
width="32"
|
height="32"
|
||||||
height="32"
|
/>
|
||||||
/>
|
</FlexItem>
|
||||||
</FlexItem>
|
<FlexBlock>
|
||||||
<FlexBlock>
|
<Flex direction="column" gap={ 1 }>
|
||||||
<Flex direction="column" gap={ 1 }>
|
<FlexItem className="woocommerce-marketing-new-campaign-type__name">
|
||||||
<FlexItem className="woocommerce-marketing-new-campaign-type__name">
|
{ el.name }
|
||||||
{ el.name }
|
</FlexItem>
|
||||||
|
<FlexItem className="woocommerce-marketing-new-campaign-type__description">
|
||||||
|
{ el.description }
|
||||||
|
</FlexItem>
|
||||||
|
</Flex>
|
||||||
|
</FlexBlock>
|
||||||
|
<FlexItem>
|
||||||
|
<Button
|
||||||
|
variant="secondary"
|
||||||
|
href={ el.createUrl }
|
||||||
|
target={
|
||||||
|
isExternalURL( el.createUrl )
|
||||||
|
? '_blank'
|
||||||
|
: '_self'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Flex gap={ 1 }>
|
||||||
|
<FlexItem>
|
||||||
|
{ __( 'Create', 'woocommerce' ) }
|
||||||
</FlexItem>
|
</FlexItem>
|
||||||
<FlexItem className="woocommerce-marketing-new-campaign-type__description">
|
{ isExternalURL( el.createUrl ) && (
|
||||||
{ el.description }
|
|
||||||
</FlexItem>
|
|
||||||
</Flex>
|
|
||||||
</FlexBlock>
|
|
||||||
<FlexItem>
|
|
||||||
<Button
|
|
||||||
variant="secondary"
|
|
||||||
href={ el.createUrl }
|
|
||||||
target={
|
|
||||||
isExternalURL( el.createUrl )
|
|
||||||
? '_blank'
|
|
||||||
: '_self'
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Flex gap={ 1 }>
|
|
||||||
<FlexItem>
|
<FlexItem>
|
||||||
{ __(
|
<Icon
|
||||||
'Create',
|
icon={ external }
|
||||||
'woocommerce'
|
size={ 16 }
|
||||||
) }
|
/>
|
||||||
</FlexItem>
|
</FlexItem>
|
||||||
{ isExternalURL( el.createUrl ) && (
|
) }
|
||||||
<FlexItem>
|
</Flex>
|
||||||
<Icon
|
</Button>
|
||||||
icon={ external }
|
</FlexItem>
|
||||||
size={ 16 }
|
</Flex>
|
||||||
/>
|
) ) }
|
||||||
</FlexItem>
|
|
||||||
) }
|
|
||||||
</Flex>
|
|
||||||
</Button>
|
|
||||||
</FlexItem>
|
|
||||||
</Flex>
|
|
||||||
);
|
|
||||||
} ) }
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{ !! recommendedChannels?.length && (
|
{ !! recommendedChannels?.length && (
|
||||||
|
|
Loading…
Reference in New Issue