File size: 314 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { createHigherOrderComponent } from '@wordpress/compose';
import { useAddMedia } from './use-add-media';

export const withAddMedia = createHigherOrderComponent(
	( Wrapped ) => ( props ) => {
		const addMedia = useAddMedia();
		return <Wrapped { ...props } addMedia={ addMedia } />;
	},
	'WithAddMedia'
);