mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
✨ New “isReady” flag to avoid invalid page content
Before this change, the onboarding wizard was briefly displayed on every page load
This commit is contained in:
parent
6a80a016cf
commit
3d05c65f50
6 changed files with 30 additions and 1 deletions
|
@ -3,6 +3,19 @@ import { apiFetch } from '@wordpress/data-controls';
|
|||
import ACTION_TYPES from './action-types';
|
||||
import { NAMESPACE, STORE_NAME } from '../constants';
|
||||
|
||||
/**
|
||||
* Non-persistent. Marks the onboarding details as "ready", i.e., fully initialized.
|
||||
*
|
||||
* @param {boolean} isReady
|
||||
* @return {{type: string, isReady}} The action.
|
||||
*/
|
||||
export const setIsReady = ( isReady ) => {
|
||||
return {
|
||||
type: ACTION_TYPES.SET_ONBOARDING_IS_READY,
|
||||
isReady,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Non-persistent. Changes the "saving" flag.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue