File size: 375 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import { createHigherOrderComponent } from '@wordpress/compose';
import useP2GuestsQuery from 'calypso/data/p2/use-p2-guests-query';

const withP2Guests = createHigherOrderComponent(
	( Wrapped ) => ( props ) => {
		const { data } = useP2GuestsQuery( props.site?.ID );
		return <Wrapped { ...props } p2Guests={ data } />;
	},
	'withP2Guests'
);

export default withP2Guests;