woocommerce/plugins/woocommerce-admin/client/index.js

28 lines
638 B
JavaScript
Raw Normal View History

/** @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';
2018-05-28 10:55:19 +00:00
import 'react-dates/initialize';
/**
* Internal dependencies
*/
import './stylesheets/_wpadmin-reset.scss';
import { PageLayout } from './layout';
render(
<APIProvider
{ ...wpApiSettings }
{ ...pick( wp.api, [ 'postTypeRestBaseMapping', 'taxonomyRestBaseMapping' ] ) }
>
<SlotFillProvider>
<PageLayout />
</SlotFillProvider>
</APIProvider>,
document.getElementById( 'root' )
);