cnap-cobre/synapse

View on GitHub
frontend/src/store/userProfile/UserProfile.js

Summary

Maintainability
A
1 hr
Test Coverage
import * as types from './types';
import { createAction } from '../utils';
 
Similar blocks of code found in 2 locations. Consider refactoring.
export const actions = {
ifNeeded: () => createAction(types.GET_USER_PROFILE_ASYNC.IF_NEEDED),
pending: () => createAction(types.GET_USER_PROFILE_ASYNC.PENDING),
success: userProfile => createAction(types.GET_USER_PROFILE_ASYNC.SUCCESS, { userProfile }),
error: error => createAction(types.GET_USER_PROFILE_ASYNC.ERROR, { error }),
};