27 lines
628 B
JavaScript
27 lines
628 B
JavaScript
|
/** @format */
|
||
|
/**
|
||
|
* External dependencies
|
||
|
*/
|
||
|
import { APIProvider } from '@wordpress/components';
|
||
|
import { pick } from 'lodash';
|
||
|
import { render } from '@wordpress/element';
|
||
|
import { Provider as SlotFillProvider } from 'react-slot-fill';
|
||
|
|
||
|
/**
|
||
|
* Internal dependencies
|
||
|
*/
|
||
|
import './stylesheets/_wpadmin-reset.scss';
|
||
|
import { EmbedLayout } from './layout';
|
||
|
|
||
|
render(
|
||
|
<APIProvider
|
||
|
{ ...wpApiSettings }
|
||
|
{ ...pick( wp.api, [ 'postTypeRestBaseMapping', 'taxonomyRestBaseMapping' ] ) }
|
||
|
>
|
||
|
<SlotFillProvider>
|
||
|
<EmbedLayout />
|
||
|
</SlotFillProvider>
|
||
|
</APIProvider>,
|
||
|
document.getElementById( 'woocommerce-embedded-root' )
|
||
|
);
|