2021-12-14 16:56:42 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { registerPlugin } from '@wordpress/plugins';
|
2023-03-10 14:58:02 +00:00
|
|
|
import { WooHeaderItem } from '@woocommerce/admin-layout';
|
2021-12-14 16:56:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import ActivityPanel from './activity-panel';
|
|
|
|
|
|
|
|
const ActivityPanelHeaderItem = () => (
|
|
|
|
<WooHeaderItem order={ 20 }>
|
|
|
|
{ ( { isEmbedded, query } ) => {
|
|
|
|
if ( ! window.wcAdminFeatures[ 'activity-panels' ] ) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return <ActivityPanel isEmbedded={ isEmbedded } query={ query } />;
|
|
|
|
} }
|
|
|
|
</WooHeaderItem>
|
|
|
|
);
|
|
|
|
|
|
|
|
registerPlugin( 'activity-panel-header-item', {
|
|
|
|
render: ActivityPanelHeaderItem,
|
|
|
|
scope: 'woocommerce-admin',
|
|
|
|
} );
|