| @@ -1,33 +1,38 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * WordPress dependencies |
| 3 | 3 | */ |
| 4 | -const { __ } = wp.i18n; | |
| 5 | -const { Button } = wp.components; | |
| 4 | +import {__} from '@wordpress/i18n'; | |
| 5 | +import {Button} from '@wordpress/components'; | |
| 6 | 6 | |
| 7 | 7 | /** |
| 8 | 8 | * Internal dependencies |
| 9 | 9 | */ |
| 10 | -import { getSiteUrl } from '../../utils'; | |
| 10 | +import {getSiteUrl} from '../../utils'; | |
| 11 | 11 | import GiveBlankSlate from '../blank-slate'; |
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Render No forms Found UI |
| 15 | -*/ | |
| 15 | + * | |
| 16 | + * @since 4.0.0 Replace "new form" with "new campaign form" link | |
| 17 | + */ | |
| 16 | 18 | |
| 17 | 19 | 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 | - ); | |
| 20 | + return ( | |
| 21 | + <GiveBlankSlate | |
| 22 | + title={__('No campaign forms found.', 'give')} | |
| 23 | + description={__('The first step towards accepting online donations is to create a campaign.', 'give')} | |
| 24 | + helpLink | |
| 25 | + > | |
| 26 | + <Button | |
| 27 | + isPrimary | |
| 28 | + isLarge | |
| 29 | + className="give-blank-slate__cta" | |
| 30 | + href={`${getSiteUrl()}/wp-admin/edit.php?post_type=give_forms&page=give-campaigns&new=campaign`} | |
| 31 | + > | |
| 32 | + {__('Create Campaign Form', 'give')} | |
| 33 | + </Button> | |
| 34 | + </GiveBlankSlate> | |
| 35 | + ); | |
| 31 | 36 | }; |
| 32 | 37 | |
| 33 | 38 | export default NoForms; |