2018-06-26 14:49:42 +00:00
|
|
|
/** @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
|
|
|
|
*/
|
2018-08-06 15:30:43 +00:00
|
|
|
import './stylesheets/_embedded.scss';
|
2018-06-26 14:49:42 +00:00
|
|
|
import { EmbedLayout } from './layout';
|
|
|
|
|
|
|
|
render(
|
|
|
|
<APIProvider
|
|
|
|
{ ...wpApiSettings }
|
|
|
|
{ ...pick( wp.api, [ 'postTypeRestBaseMapping', 'taxonomyRestBaseMapping' ] ) }
|
|
|
|
>
|
|
|
|
<SlotFillProvider>
|
|
|
|
<EmbedLayout />
|
|
|
|
</SlotFillProvider>
|
|
|
|
</APIProvider>,
|
|
|
|
document.getElementById( 'woocommerce-embedded-root' )
|
|
|
|
);
|