index.js
31 lines
| 1 | /** |
| 2 | * Block dependencies |
| 3 | */ |
| 4 | import GiveBlankSlate from '../blank-slate/index'; |
| 5 | |
| 6 | /** |
| 7 | * Internal dependencies |
| 8 | */ |
| 9 | const { __ } = wp.i18n; |
| 10 | const { Button } = wp.components; |
| 11 | |
| 12 | /** |
| 13 | * Render No forms Found UI |
| 14 | */ |
| 15 | |
| 16 | const NoForms = () => { |
| 17 | return ( |
| 18 | <GiveBlankSlate title={ __( 'No donation forms found.' ) } |
| 19 | description={ __( 'The first step towards accepting online donations is to create a form.' ) } |
| 20 | helpLink> |
| 21 | <Button isPrimary |
| 22 | isLarge |
| 23 | href={ `${ wpApiSettings.schema.url }/wp-admin/post-new.php?post_type=give_forms` }> |
| 24 | { __( 'Create Donation Form' ) } |
| 25 | </Button> |
| 26 | </GiveBlankSlate> |
| 27 | ); |
| 28 | }; |
| 29 | |
| 30 | export default NoForms; |
| 31 |