File size: 601 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import { createHigherOrderComponent } from '@wordpress/compose';
import { useSelector } from 'react-redux';
import { getSelectedSiteId } from 'calypso/state/ui/selectors';
import { useBlockEditorNuxStatusQuery } from './use-block-editor-nux-status-query';
const withBlockEditorNuxStatus = createHigherOrderComponent(
( Wrapped ) => ( props ) => {
const siteId = useSelector( getSelectedSiteId );
const { data } = useBlockEditorNuxStatusQuery( siteId );
return <Wrapped { ...props } blockEditorNuxStatus={ data } />;
},
'withBlockEditorNuxStatus'
);
export default withBlockEditorNuxStatus;
|