Fix build error after merging.

This commit is contained in:
Gan Eng Chin 2023-02-27 23:49:50 +08:00
parent f420a0ed9e
commit 418e4fba02
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
2 changed files with 20 additions and 7 deletions

View File

@ -8,4 +8,3 @@ export { PluginCardBody, SmartPluginCardBody } from './PluginCardBody';
export { CardHeaderTitle } from './CardHeaderTitle'; export { CardHeaderTitle } from './CardHeaderTitle';
export { CardHeaderDescription } from './CardHeaderDescription'; export { CardHeaderDescription } from './CardHeaderDescription';
export { CenteredSpinner } from './CenteredSpinner'; export { CenteredSpinner } from './CenteredSpinner';
export { RecommendedChannelsList } from './RecommendedChannelsList';

View File

@ -2,9 +2,10 @@
* External dependencies * External dependencies
*/ */
import { __ } from '@wordpress/i18n'; import { __ } from '@wordpress/i18n';
import { useState } from '@wordpress/element'; import { Fragment, useState } from '@wordpress/element';
import { import {
Button, Button,
CardDivider,
Modal, Modal,
Icon, Icon,
Flex, Flex,
@ -17,8 +18,8 @@ import classnames from 'classnames';
/** /**
* Internal dependencies * Internal dependencies
*/ */
import { RecommendedChannelsList } from '~/marketing/components';
import { useRecommendedChannels } from '~/marketing/hooks'; import { useRecommendedChannels } from '~/marketing/hooks';
import { SmartPluginCardBody } from '~/marketing/components';
import { useNewCampaignTypes } from './useNewCampaignTypes'; import { useNewCampaignTypes } from './useNewCampaignTypes';
import './CreateNewCampaignModal.scss'; import './CreateNewCampaignModal.scss';
@ -115,7 +116,7 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
} ) } } ) }
</div> </div>
</div> </div>
{ recommendedChannels.length > 0 && ( { recommendedChannels?.length && (
<div className="woocommerce-marketing-add-channels"> <div className="woocommerce-marketing-add-channels">
<Flex direction="column"> <Flex direction="column">
<FlexItem> <FlexItem>
@ -135,9 +136,22 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
</FlexItem> </FlexItem>
{ ! collapsed && ( { ! collapsed && (
<FlexItem> <FlexItem>
<RecommendedChannelsList { recommendedChannels.map( ( el, idx ) => {
recommendedChannels={ recommendedChannels } return (
/> <Fragment key={ el.plugin }>
<SmartPluginCardBody
plugin={ el }
onInstalledAndActivated={
// TODO: check what to do here.
() => {}
}
/>
{ idx !==
recommendedChannels.length -
1 && <CardDivider /> }
</Fragment>
);
} ) }
</FlexItem> </FlexItem>
) } ) }
</Flex> </Flex>