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