mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
🔥 Remove isSaving; move isBusy to common store
This commit is contained in:
parent
10a3767e2f
commit
2b2b24e434
7 changed files with 15 additions and 43 deletions
|
@ -41,9 +41,7 @@ const useOnboardingDetails = () => {
|
|||
const flags = useSelect( ( select ) => select( STORE_NAME ).flags(), [] );
|
||||
|
||||
// Transient accessors.
|
||||
const isSaving = useTransient( 'isSaving' );
|
||||
const isReady = useTransient( 'isReady' );
|
||||
const isBusy = useTransient( 'isBusy' );
|
||||
|
||||
// Persistent accessors.
|
||||
const step = usePersistent( 'step' );
|
||||
|
@ -68,9 +66,8 @@ const useOnboardingDetails = () => {
|
|||
};
|
||||
|
||||
return {
|
||||
isSaving,
|
||||
flags,
|
||||
isReady,
|
||||
isBusy,
|
||||
step,
|
||||
setStep: ( value ) => setDetailAndPersist( setStep, value ),
|
||||
completed,
|
||||
|
@ -91,14 +88,11 @@ const useOnboardingDetails = () => {
|
|||
setDetailAndPersist( setIsCasualSeller, value ),
|
||||
products,
|
||||
toggleProduct,
|
||||
flags,
|
||||
};
|
||||
};
|
||||
|
||||
export const useConnection = () => {
|
||||
const {
|
||||
isSaving,
|
||||
isBusy,
|
||||
isSandboxMode,
|
||||
setSandboxMode,
|
||||
isManualConnectionMode,
|
||||
|
@ -110,8 +104,6 @@ export const useConnection = () => {
|
|||
} = useOnboardingDetails();
|
||||
|
||||
return {
|
||||
isSaving,
|
||||
isBusy,
|
||||
isSandboxMode,
|
||||
setSandboxMode,
|
||||
isManualConnectionMode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue