Remove unneeded CardDivider in CreateNewCampaignModal.

The code is copied from the Channels component, but in CreateNewCampaignModal, we don't need to display the divider, so we can just remove the divider code.
This commit is contained in:
Gan Eng Chin 2023-03-09 22:23:27 +08:00
parent c6dcee426b
commit e15305b7c3
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
2 changed files with 8 additions and 21 deletions

View File

@ -28,10 +28,6 @@
padding: $gap 0;
}
.components-card-divider {
display: none;
}
.woocommerce-marketing-new-campaign-type {
padding: $gap 0;

View File

@ -2,10 +2,9 @@
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Fragment, useState } from '@wordpress/element';
import { useState } from '@wordpress/element';
import {
Button,
CardDivider,
Modal,
Icon,
Flex,
@ -139,21 +138,13 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
</FlexItem>
{ ! collapsed && (
<FlexItem>
{ recommendedChannels.map( ( el, idx ) => {
return (
<Fragment key={ el.plugin }>
<SmartPluginCardBody
plugin={ el }
onInstalledAndActivated={
refetch
}
/>
{ idx !==
recommendedChannels.length -
1 && <CardDivider /> }
</Fragment>
);
} ) }
{ recommendedChannels.map( ( el ) => (
<SmartPluginCardBody
key={ el.plugin }
plugin={ el }
onInstalledAndActivated={ refetch }
/>
) ) }
</FlexItem>
) }
</Flex>