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
ActionFetchButton.js
26 lines
| 1 | import withCurrentAction from '../hooks/withCurrentAction'; |
| 2 | import withSelectActionLoading from '../hooks/withSelectActionLoading'; |
| 3 | import FetchApiButton from './FetchApiButton'; |
| 4 | |
| 5 | |
| 6 | const { compose } = wp.compose; |
| 7 | |
| 8 | const { |
| 9 | withSelect, |
| 10 | } = wp.data; |
| 11 | |
| 12 | function ActionFetchButton( { |
| 13 | currentAction, |
| 14 | ...props |
| 15 | } ) { |
| 16 | |
| 17 | return <FetchApiButton |
| 18 | id={ currentAction.id } |
| 19 | { ...props } |
| 20 | />; |
| 21 | } |
| 22 | |
| 23 | export default compose( |
| 24 | withSelect( withCurrentAction ), |
| 25 | withSelect( withSelectActionLoading ), |
| 26 | )( ActionFetchButton ); |