Add InstalledChannelCardBody to Channels.
This commit is contained in:
parent
92112e27a1
commit
a9010ffd68
|
@ -16,6 +16,7 @@ import {
|
|||
} from '~/marketing/components';
|
||||
import { useChannels } from './useChannels';
|
||||
import './Channels.scss';
|
||||
import { InstalledChannelCardBody } from './InstalledChannelCardBody';
|
||||
|
||||
export const Channels = () => {
|
||||
const {
|
||||
|
@ -90,10 +91,23 @@ export const Channels = () => {
|
|||
</CardHeader>
|
||||
|
||||
{ /* TODO: registered channels here. */ }
|
||||
{ registeredChannels.map( ( el, idx ) => {
|
||||
return (
|
||||
<Fragment key={ el.slug }>
|
||||
<InstalledChannelCardBody installedChannel={ el } />
|
||||
{ idx < registeredChannels.length - 1 && (
|
||||
<CardDivider />
|
||||
) }
|
||||
</Fragment>
|
||||
);
|
||||
} ) }
|
||||
|
||||
{ /* TODO: recommended channels here. */ }
|
||||
{ recommendedChannels.length > 0 && (
|
||||
<>
|
||||
<CardDivider />
|
||||
<CardBody>recommended</CardBody>
|
||||
</>
|
||||
) }
|
||||
</Card>
|
||||
);
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
.woocommerce-marketing-installed-channel-card-body {
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { CardBody } from '@wordpress/components';
|
||||
|
||||
/**
|
||||
* Internal dependencies
|
||||
*/
|
||||
import { InstalledChannel } from '~/marketing/types';
|
||||
import './InstalledChannelCardBody.scss';
|
||||
|
||||
type InstalledChannelCardBodyProps = {
|
||||
installedChannel: InstalledChannel;
|
||||
};
|
||||
|
||||
export const InstalledChannelCardBody: React.FC<
|
||||
InstalledChannelCardBodyProps
|
||||
> = ( { installedChannel } ) => {
|
||||
return (
|
||||
<CardBody className="woocommerce-marketing-installed-channel-card-body">
|
||||
InstalledChannelCardBody
|
||||
</CardBody>
|
||||
);
|
||||
};
|
Loading…
Reference in New Issue