♻️ MInor code organization

This commit is contained in:
Philipp Stracker 2024-10-28 18:56:25 +01:00
parent 46c7b84088
commit 6a80a016cf
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
export default {
// Transient data.
SET_IS_SAVING_ONBOARDING_DETAILS: 'SET_IS_SAVING_ONBOARDING_DETAILS',
SET_IS_SAVING_ONBOARDING: 'SET_IS_SAVING_ONBOARDING',
// Persistent data.
SET_ONBOARDING_COMPLETED: 'SET_ONBOARDING_COMPLETED',

View file

@ -11,7 +11,7 @@ import { NAMESPACE, STORE_NAME } from '../constants';
*/
export const setIsSaving = ( isSaving ) => {
return {
type: ACTION_TYPES.SET_IS_SAVING_ONBOARDING_DETAILS,
type: ACTION_TYPES.SET_IS_SAVING_ONBOARDING,
isSaving,
};
};

View file

@ -40,10 +40,13 @@ export const onboardingReducer = (
switch ( type ) {
// Transient data.
case ACTION_TYPES.SET_IS_SAVING_ONBOARDING_DETAILS:
case ACTION_TYPES.SET_IS_SAVING_ONBOARDING:
return setTransient( { isSaving: action.isSaving } );
// Persistent data.
case ACTION_TYPES.SET_ONBOARDING_DETAILS:
return setPersistent( action.payload );
case ACTION_TYPES.SET_ONBOARDING_COMPLETED:
return setPersistent( { completed: action.completed } );
@ -53,9 +56,6 @@ export const onboardingReducer = (
case ACTION_TYPES.SET_CLIENT_SECRET:
return setPersistent( { clientSecret: action.clientSecret } );
case ACTION_TYPES.SET_ONBOARDING_DETAILS:
return setPersistent( action.payload );
case ACTION_TYPES.SET_ONBOARDING_STEP:
return setPersistent( { step: action.step } );