mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
🎨 Reorganize code
This commit is contained in:
parent
e4430996ca
commit
e20a6fdbce
2 changed files with 12 additions and 7 deletions
|
@ -1,6 +1,9 @@
|
|||
export default {
|
||||
SET_ONBOARDING_DETAILS: 'SET_ONBOARDING_DETAILS',
|
||||
// Transient data.
|
||||
SET_IS_SAVING_ONBOARDING_DETAILS: 'SET_IS_SAVING_ONBOARDING_DETAILS',
|
||||
|
||||
// Persistent data.
|
||||
SET_ONBOARDING_DETAILS: 'SET_ONBOARDING_DETAILS',
|
||||
SET_ONBOARDING_STEP: 'SET_ONBOARDING_STEP',
|
||||
SET_SANDBOX_MODE: 'SET_SANDBOX_MODE',
|
||||
SET_MANUAL_CONNECTION_MODE: 'SET_MANUAL_CONNECTION_MODE',
|
||||
|
|
|
@ -14,18 +14,20 @@ export const onboardingReducer = (
|
|||
{ type, ...action }
|
||||
) => {
|
||||
switch ( type ) {
|
||||
case ACTION_TYPES.SET_ONBOARDING_DETAILS:
|
||||
return {
|
||||
...state,
|
||||
data: action.payload,
|
||||
};
|
||||
|
||||
// Transient data.
|
||||
case ACTION_TYPES.SET_IS_SAVING_ONBOARDING_DETAILS:
|
||||
return {
|
||||
...state,
|
||||
isSaving: action.isSaving,
|
||||
};
|
||||
|
||||
// Persistent data.
|
||||
case ACTION_TYPES.SET_ONBOARDING_DETAILS:
|
||||
return {
|
||||
...state,
|
||||
data: action.payload,
|
||||
};
|
||||
|
||||
case ACTION_TYPES.SET_ONBOARDING_STEP:
|
||||
return {
|
||||
...state,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue