| 1 |
/** |
| 2 |
* WordPress dependencies |
| 3 |
*/ |
| 4 |
import { Fragment } from '@wordpress/element'; |
| 5 |
import ServerSideRender from '@wordpress/server-side-render'; |
| 6 |
import {withSelect} from '@wordpress/data'; |
| 7 |
|
| 8 |
/** |
| 9 |
* Internal dependencies |
| 10 |
*/ |
| 11 |
import Inspector from './inspector'; |
| 12 |
|
| 13 |
/** |
| 14 |
* Render Block UI For Editor |
| 15 |
*/ |
| 16 |
|
| 17 |
const GiveDonationFormGrid = ( props ) => { |
| 18 |
const { attributes } = props; |
| 19 |
|
| 20 |
return ( |
| 21 |
<Fragment> |
| 22 |
<Inspector { ... { ...props } } /> |
| 23 |
<ServerSideRender block="give/donation-form-grid" attributes={ attributes } /> |
| 24 |
</Fragment> |
| 25 |
); |
| 26 |
}; |
| 27 |
|
| 28 |
export default withSelect( ( select ) => { |
| 29 |
return { |
| 30 |
forms: select( 'core' ).getEntityRecords( 'postType', 'give_forms' ), |
| 31 |
}; |
| 32 |
} )( GiveDonationFormGrid ); |
| 33 |
|