ActionFetchButton.js
2 years ago
ActionMessages.js
2 years ago
ActionMessagesSlotFills.js
2 years ago
FetchAjaxButton.js
2 years ago
FetchApiButton.js
2 years ago
PlaceholderMessage.js
2 years ago
RequestButton.js
2 years ago
RequestLoadingButton.js
2 years ago
UseGlobalControl.js
2 years ago
ValidateButton.js
2 years ago
ValidateButtonWithStore.js
2 years ago
ValidateButtonWithStore.js
19 lines
| 1 | import FetchAjaxButton from './FetchAjaxButton'; |
| 2 | |
| 3 | const { |
| 4 | useSelect, |
| 5 | } = wp.data; |
| 6 | |
| 7 | function ValidateButtonWithStore( props ) { |
| 8 | |
| 9 | const currentAction = useSelect( ( select ) => { |
| 10 | return select( 'jet-forms/actions' ).getCurrentAction(); |
| 11 | }, [] ); |
| 12 | |
| 13 | return <FetchAjaxButton |
| 14 | id={ currentAction.id } |
| 15 | { ...props } |
| 16 | />; |
| 17 | } |
| 18 | |
| 19 | export default ValidateButtonWithStore; |